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

Release 5.8.0 introduced PHP Warnings, at least in 'wp shell' #15902

Closed
n9yty opened this issue May 30, 2019 · 4 comments · Fixed by #15981
Closed

Release 5.8.0 introduced PHP Warnings, at least in 'wp shell' #15902

n9yty opened this issue May 30, 2019 · 4 comments · Fixed by #15981
Labels
Needs Testing Needs further testing to be confirmed. [Priority] High Used to indicate top priority items that need quick attention REST API Interaction Related to REST API

Comments

@n9yty
Copy link

n9yty commented May 30, 2019

After upgrading to v5.8.0 I noticed when working in wp shell that I always get two of these warnings when the shell starts up:

Warning: Invalid argument supplied for foreach() in /home/ourpreschoollife/public_html/wp-includes/rest-api/endpoints/class-wp-rest-controller.php on line 287

Reverting to 5.7.9 removes them.

@swissspidy swissspidy added Needs Testing Needs further testing to be confirmed. REST API Interaction Related to REST API labels May 30, 2019
@TimothyBJacobs
Copy link
Member

I believe this is because the rest controllers specify a schema callback when registering the route even though they don't define a schema using get_item_schema()

@lkraav
Copy link

lkraav commented May 31, 2019

Confirmed, this is happening. https://sentry.crdy.co/share/issue/cc7e19c03f5a4344a141d879ed7fb323/ is a traceback. Warning is caused by /__experimental/widget-areas/(?P<id>.+) route, and $schema['properties'] is not a valid foreach argument.

@jorgefilipecosta jorgefilipecosta added the [Priority] High Used to indicate top priority items that need quick attention label Jun 3, 2019
@n9yty
Copy link
Author

n9yty commented Jul 15, 2019

What is needed to move this forward?

@larssn
Copy link

larssn commented Aug 1, 2019

$schema['properties'] is undefined.

We're seeing it when invoking jobs via the WP CLI, like so:
wp cron event run --due-now --url=$uri --path=/var/www/html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Testing Needs further testing to be confirmed. [Priority] High Used to indicate top priority items that need quick attention REST API Interaction Related to REST API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants