[wp-trac] [WordPress Trac] #25230: In get_pages, don't require hierarchical => false for parent arg

WordPress Trac noreply at wordpress.org
Mon Oct 28 19:46:54 UTC 2013


#25230: In get_pages, don't require hierarchical => false for parent arg
----------------------------+-----------------------------
 Reporter:  wonderboymusic  |       Owner:  wonderboymusic
     Type:  defect (bug)    |      Status:  reopened
 Priority:  normal          |   Milestone:  3.7
Component:  Query           |     Version:  1.5
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+-----------------------------
Changes (by chrisbliss18):

 * cc: gaarai@… (added)
 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Added a new patch for this issue as the original one introduced a bug that
 causes the hierarchical argument, which is enabled by default, to be
 disabled when -1 is supplied for the parent argument, it is -1 by default.

 The problem seems to be that in simplifying the conditional, the "> 0"
 portion of the conditional was removed. Since -1 is truthy, the
 conditional incorrectly applied when -1 was supplied for parent.

 My supplied patch, 25230.1.diff, fixes this issue.

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


More information about the wp-trac mailing list