diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-07-02 21:02:51 -0400 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-07-02 21:02:51 -0400 |
commit | 8ad4ac8ecfd673f77d7e16638c7930e8e0b99812 (patch) | |
tree | c3dd2fb45ca0f764dac02e651f3ea3a1551c022f /mod/pages/lib/pages.php | |
parent | 4859e56edf1b17092751a6e9d7d89b03113253db (diff) | |
download | elgg-8ad4ac8ecfd673f77d7e16638c7930e8e0b99812.tar.gz elgg-8ad4ac8ecfd673f77d7e16638c7930e8e0b99812.tar.bz2 |
removed a warning when creating the pages menu tree
Diffstat (limited to 'mod/pages/lib/pages.php')
-rw-r--r-- | mod/pages/lib/pages.php | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/mod/pages/lib/pages.php b/mod/pages/lib/pages.php index 3f27118a6..9a9ba12e9 100644 --- a/mod/pages/lib/pages.php +++ b/mod/pages/lib/pages.php @@ -103,16 +103,18 @@ function pages_register_navigation_tree($container) { 'metadata_value' => $parent->getGUID(), 'limit' => 0, )); - - foreach ($children as $child) { - elgg_register_menu_item('pages_nav', array( - 'name' => $child->getGUID(), - 'text' => $child->title, - 'href' => $child->getURL(), - 'parent_name' => $parent->getGUID(), - )); - array_push($stack, $child); + + if ($children) { + foreach ($children as $child) { + elgg_register_menu_item('pages_nav', array( + 'name' => $child->getGUID(), + 'text' => $child->title, + 'href' => $child->getURL(), + 'parent_name' => $parent->getGUID(), + )); + array_push($stack, $child); + } } } } -}
\ No newline at end of file +} |