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: http://core.svn.wordpress.org/trunk@23212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-12-27 15:48:18 +00:00
parent 7c5a0db7c1
commit 0d3d52a92a
1 changed files with 1 additions and 1 deletions

View File

@ -682,7 +682,7 @@ final class WP_Post {
*/
function get_post_ancestors( $post ) {
if ( ! $post )
return false;
return array();
$post = get_post( $post );