[wp-trac] [WordPress Trac] #23708: get_post_ancestors() no longer works inside loop
WordPress Trac
noreply at wordpress.org
Wed Mar 6 19:20:21 UTC 2013
#23708: get_post_ancestors() no longer works inside loop
-----------------------------+--------------------------
Reporter: ripsup | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: General
Version: 3.5.1 | Severity: normal
Keywords: |
-----------------------------+--------------------------
When upgrading from 3.3.1 to 3.5.1 we found that get_post_ancestors() no
longer works inside the loop like it is suppose to.
This issue stems from the addition line to the beginning of the function
(lines 684-685 of /wp-includes/post.php)
{{{
if ( ! $post )
return array();
}}}
I believe this to be a bug, I couldn't find anywhere that this
functionality change was desired and breaks anything that relied on this.
There was a recent change in Ticket #22882 but this was for a different
issue related to this code. If this was an intentional change please tell
me where this was that referenced so I better understand where to look in
the future.
The fix is just removing these 2 lines.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23708>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list