mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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:
parent
7c5a0db7c1
commit
0d3d52a92a
@ -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