Opened 13 years ago
Closed 13 years ago
#18257 closed defect (bug) (duplicate)
Fatal error: Cannot use object of type stdClass as array in /.../wp-includes/post.php on line 1202
Reported by: | jmaimarc | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | needs-patch |
Focuses: | Cc: |
Description
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
$obj = get_post_type_object($pt); returns object into $obj
$posttype = get_post_type_labels($obj); returns ERROR
Change History (2)
Note: See
TracTickets for help on using
tickets.
Similar: #16310