[wp-trac] [WordPress Trac] #45206: Logic error in do_meta_boxes() for Gutenberg support
WordPress Trac
noreply at wordpress.org
Sun Oct 28 15:39:49 UTC 2018
#45206: Logic error in do_meta_boxes() for Gutenberg support
--------------------------------+---------------------
Reporter: johnjamesjacoby | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.0
Component: Options, Meta APIs | Version: 5.0
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------------+---------------------
Description changed by johnjamesjacoby:
Old description:
> 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 https://core.trac.wordpress.org/changeset/43779.
>
> Patch with a recommended fix imminent.
New description:
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, r37972, supports this notion.)
Related to #45112, and r43779.
Patch with a recommended fix imminent.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45206#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list