[wp-trac] Re: [WordPress Trac] #10053: get_children() returns false
when no children are found
WordPress Trac
wp-trac at lists.automattic.com
Sun Jun 7 10:40:57 GMT 2009
#10053: get_children() returns false when no children are found
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner: ryan
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.9
Component: Query | Version: 2.7
Severity: minor | Keywords: has-patch
-------------------------------+--------------------------------------------
Comment(by scribu):
By the way, doesn't get_posts() also return false when no posts are found?
We should be consistent about this.
You usually have to do something different when you don't find any items,
and it's easier to check if ( $children ) than if ( empty($children) ).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10053#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list