Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Return empty array instead of null. Props Denis-de-Bernardy. fixes #1…

…1661 for 2.9

git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit d172617902488b5181cfb103861880cb478bcea8 1 parent 22f08f2
ryan authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 wp-includes/post.php
6 wp-includes/post.php
View
@@ -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 ) {
Please sign in to comment.
Something went wrong with that request. Please try again.