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

PHP Notice: REST API route definition missing the required permission_callback argument #220

Closed
dkotter opened this issue Aug 25, 2020 · 1 comment · Fixed by #219
Closed
Assignees
Labels
type:bug Something isn't working.
Milestone

Comments

@dkotter
Copy link
Collaborator

dkotter commented Aug 25, 2020

Describe the bug
In WordPress 5.5, the permission_callback argument is now required when registering custom REST endpoints with register_rest_route. If you don't pass that and you have debug turned on, you'll get PHP notices.

Steps to Reproduce

  1. Update to WordPress 5.5
  2. Have debug turned on
  3. Edit or create a new post
  4. See PHP notices

Expected behavior
Should not output any notices when debug is turned on

@dkotter dkotter added the type:bug Something isn't working. label Aug 25, 2020
@dkotter dkotter self-assigned this Aug 25, 2020
@dkotter
Copy link
Collaborator Author

dkotter commented Aug 25, 2020

Looks like there's a PR already open to fix this: #219

@dkotter dkotter linked a pull request Aug 25, 2020 that will close this issue
6 tasks
@jeffpaul jeffpaul added this to the 1.6.0 milestone Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants