From dd9bb0699cdae01892d2722126dd7247c95d17aa Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Mon, 28 Nov 2005 06:38:12 +0000 Subject: [PATCH] Return if not an array, fixes #1940 git-svn-id: https://develop.svn.wordpress.org/trunk@3217 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/template-functions-post.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/template-functions-post.php b/wp-includes/template-functions-post.php index e356aeb9a1..9b72900866 100644 --- a/wp-includes/template-functions-post.php +++ b/wp-includes/template-functions-post.php @@ -403,6 +403,9 @@ function _page_level_out($parent, $page_tree, $args, $depth = 0, $echo = true) { $indent = str_repeat("\t", $depth); //$indent = join('', array_fill(0,$depth,"\t")); + if ( !is_array($page_tree[$parent]['children']) ) + return false; + foreach ( $page_tree[$parent]['children'] as $page_id ) { $cur_page = $page_tree[$page_id]; $title = $cur_page['title'];