Always return arrays from get_post_ancestors(). Return an array when passed a value that evaluates to false.
props dannydehaan. fixes #22882 for trunk. Test: [1177/tests]. git-svn-id: https://develop.svn.wordpress.org/trunk@23212 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
41f3ab73ff
commit
32b79f7d61
@ -682,7 +682,7 @@ final class WP_Post {
|
||||
*/
|
||||
function get_post_ancestors( $post ) {
|
||||
if ( ! $post )
|
||||
return false;
|
||||
return array();
|
||||
|
||||
$post = get_post( $post );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user