Skip to content

Commit

Permalink
Return empty array instead of null. Props Denis-de-Bernardy. fixes #1…
Browse files Browse the repository at this point in the history
…1661 for 2.9

git-svn-id: https://develop.svn.wordpress.org/branches/2.9@12572 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
ryanboren committed Dec 29, 2009
1 parent 9e0a9fc commit 9ac4ff3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions wp-includes/post.php
Expand Up @@ -2391,8 +2391,10 @@ function &get_page_children($page_id, $pages) {
*/
function &get_page_hierarchy( &$pages, $page_id = 0 ) {

if ( empty( $pages ) )
return null;
if ( empty( $pages ) ) {
$return = array();
return $return;
}

$children = array();
foreach ( (array) $pages as $p ) {
Expand Down

0 comments on commit 9ac4ff3

Please sign in to comment.