Return if not an array, fixes #1940
git-svn-id: https://develop.svn.wordpress.org/trunk@3217 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6c488f6415
commit
dd9bb0699c
|
@ -403,6 +403,9 @@ function _page_level_out($parent, $page_tree, $args, $depth = 0, $echo = true) {
|
||||||
$indent = str_repeat("\t", $depth);
|
$indent = str_repeat("\t", $depth);
|
||||||
//$indent = join('', array_fill(0,$depth,"\t"));
|
//$indent = join('', array_fill(0,$depth,"\t"));
|
||||||
|
|
||||||
|
if ( !is_array($page_tree[$parent]['children']) )
|
||||||
|
return false;
|
||||||
|
|
||||||
foreach ( $page_tree[$parent]['children'] as $page_id ) {
|
foreach ( $page_tree[$parent]['children'] as $page_id ) {
|
||||||
$cur_page = $page_tree[$page_id];
|
$cur_page = $page_tree[$page_id];
|
||||||
$title = $cur_page['title'];
|
$title = $cur_page['title'];
|
||||||
|
|
Loading…
Reference in New Issue