Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in Messages.php #2200

Closed
WeeRuz opened this issue Sep 27, 2018 · 1 comment
Closed

Bug in Messages.php #2200

WeeRuz opened this issue Sep 27, 2018 · 1 comment

Comments

@WeeRuz
Copy link

WeeRuz commented Sep 27, 2018

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

@benhaynes benhaynes added the v6 label Oct 12, 2018
@benhaynes
Copy link
Sponsor Member

Kamino closed and cloned this issue to directus/directus-6-legacy

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants