[wp-trac] [WordPress Trac] #16310: get_taxonomy_labels() and _get_custom_object_labels() fail if $object->taxonomy is not array

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 19 20:11:33 UTC 2011


#16310: get_taxonomy_labels() and _get_custom_object_labels() fail if
$object->taxonomy is not array
--------------------------+------------------------------
 Reporter:  foofy         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Taxonomy      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------

Comment (by foofy):

 This will throw a fatal "cannot use object of type stdClass as array"
 error at line 1174 of wp-includes/post.php:

 {{{
 $tax = get_taxonomy('category');
 $labels = get_taxonomy_labels($tax);
 }}}

 nacin: That makes sense for _get_custom_object_labels() but
 get_taxonomy_labels() is a public API function.

 Hope this helps.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16310#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list