[wp-trac] [WordPress Trac] #33023: Error wp-includes/post.php in _get_custom_object_labels
WordPress Trac
noreply at wordpress.org
Fri Jul 17 08:19:12 UTC 2015
#33023: Error wp-includes/post.php in _get_custom_object_labels
--------------------------+-----------------------------
Reporter: zsiteru | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.2.2
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
When you use construction like this:
$post_type_obj = get_post_type_object ( $post_type );
$labels = get_post_type_labels($post_type_obj)
.............................
global $wp_post_types will be rewrite and property
$wp_post_types[$post_type]->labels will be an array and must be object.
It is critical for wp-admin/includes/post.php $sendback_text =
get_post_type_object( $post->post_type )->labels->all_items; (~line 1250)
wp-includes/post.php line:1716 - 1718
{{{
$defaults[$key] = $object->hierarchical ? $value[1] :
$value[0];
}
$labels = array_merge( $defaults, $object->labels );
+ $object->labels = (object)$object->labels;
return (object) $labels;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33023>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list