[wp-trac] [WordPress Trac] #45206: Logic error in do_meta_boxes() for Gutenberg support
WordPress Trac
noreply at wordpress.org
Fri Oct 26 20:09:48 UTC 2018
#45206: Logic error in do_meta_boxes() for Gutenberg support
-----------------------------+-----------------------------
Reporter: johnjamesjacoby | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 5.0
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
When testing 5.0 beta 1 on an existing error-free installation, I started
seeing fatal errors in the logs of a multisite network I maintain.
To quickly duplicate, install and activate the
[https://wordpress.org/plugins/wp-user-profiles/ WP User Profiles plugin]
(which uses meta-boxes for user profile pages) and visit your profile
inside of WordPress admin.
{{{
PHP message: PHP Fatal error: Uncaught Error: Cannot use object of type
WP_User as array in /public/wordpress/wp-admin/includes/template.php:1066
}}}
Specifically:
{{{
thrown in /public/wordpress/wp-admin/includes/template.php on line 1066"
while reading upstream, client: 184.58.156.205, server: , request: "GET
/wp-admin/users.php?page=profile HTTP/1.0", upstream:
"fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "jjj.blog",
referrer: "https://jjj.blog/wp-admin/users.php?page=account"
}}}
In short, it is incorrect to assume that meta-boxes are always for posts,
and that the `args` key is always present, and is an array. (The
`is_array( $box['args'] )` check from 2016, r37913, supports this notion.)
Related to #45112, and r43608.
Patch with a recommended fix imminent.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45206>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list