[wp-trac] [WordPress Trac] #18257: Fatal error: Cannot use object of type stdClass as array in /.../wp-includes/post.php on line 1202
WordPress Trac
wp-trac at lists.automattic.com
Tue Jul 26 10:18:11 UTC 2011
#18257: Fatal error: Cannot use object of type stdClass as array in /.../wp-
includes/post.php on line 1202
--------------------------+-----------------------------
Reporter: jmaimarc | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Post Types | Version:
Severity: normal | Keywords: needs-patch
--------------------------+-----------------------------
It's checking against empty() in the second half of the if() statement
which can only be strings, integers, floats, NULL, TRUE/FALSE, arrays or
variables.
The function get_post_type_labels() is passing a stdClass object into
_get_custom_object_labels( $object, $nohier_vs_hier_defaults ).
$pt = get_post_type(); //returns string into $pt[[BR]]
$obj = get_post_type_object($pt); //returns object into $obj[[BR]]
$posttype = get_post_type_labels($obj); //returns ERROR[[BR]]
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18257>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list