Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Bug in Messages.php #77

Open
benhaynes opened this issue Oct 25, 2018 · 0 comments
Open

Bug in Messages.php #77

benhaynes opened this issue Oct 25, 2018 · 0 comments
Labels

Comments

@benhaynes
Copy link
Member

From directus created by WeeRuz : directus/directus#2200

Version Info

  • Directus version and branch (Or commit hash): 6.4.9
  • PHP version: 7.0.32
  • MySQL version: 5.7.23-cll-lve
  • Web server: Apache 2.4.34
  • OS name and version: Linux 3.10.0-714.10.2.lve1.5.15.el7.x86_64

Expected Behavior

GET api/1.1/messages/rows/1 should return message with ID 1

Actual Behavior

Returns "Message not found"

Steps to Reproduce

  1. Create a message in the admin
  2. Make a get or go to api/1.1/messages/rows/[id] where [id] is the id of your newly created message

Fix

I found the bug and fix in the source code. In api/routes/A1/Messages.php row 104 there is an unused variable: $result.
Change this to $message, $message seems to be the right variable, judging from the code below.

api/1.1/messages/rows/1 now returns expected message.

Screenshots

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant