[wp-trac] [WordPress Trac] #30700: get_terms throws PHP notice when fields is set to 'id=>name'
WordPress Trac
noreply at wordpress.org
Sat Dec 13 02:30:28 UTC 2014
#30700: get_terms throws PHP notice when fields is set to 'id=>name'
-------------------------------+-----------------------------
Reporter: webgeekconsulting | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 4.0.1
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
The following code will raise a notice in PHP version 5.3.27
{{{
get_terms( 'category', array( 'fields' => 'id=>name' ) );
}}}
{{{Notice: Undefined property: stdClass::$count in wp-
includes/taxonomy.php on line 1590}}}
It seems this is because the field "count" is not returned as part of the
result set.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30700>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list