From 32b79f7d619f1bc32cd1189596456bb7854e68d6 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 27 Dec 2012 15:48:18 +0000 Subject: [PATCH] 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 --- wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index f1b1bf96bd..6e575ea949 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -682,7 +682,7 @@ final class WP_Post { */ function get_post_ancestors( $post ) { if ( ! $post ) - return false; + return array(); $post = get_post( $post );