From e8a48125262901113316162abf7c316e361309ad Mon Sep 17 00:00:00 2001 From: matt Date: Mon, 28 Nov 2005 06:38:12 +0000 Subject: [PATCH] Return if not an array, fixes #1940 git-svn-id: http://svn.automattic.com/wordpress/trunk@3217 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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'];