aboutsummaryrefslogtreecommitdiff
path: root/mod/pages/lib/pages.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-06-18 17:59:26 -0400
committerCash Costello <cash.costello@gmail.com>2012-06-18 17:59:26 -0400
commitf7fa256e09694c2ed18663bd8e3e0c0ffd20b9e5 (patch)
treec8a0f759a4a03ef3aec685dc6ce788105cf2b62b /mod/pages/lib/pages.php
parent3ad8110fdb13925292cfbebc672bb4bbae992ed5 (diff)
downloadelgg-f7fa256e09694c2ed18663bd8e3e0c0ffd20b9e5.tar.gz
elgg-f7fa256e09694c2ed18663bd8e3e0c0ffd20b9e5.tar.bz2
fixed a warning due to foreach over empty array
Diffstat (limited to 'mod/pages/lib/pages.php')
-rw-r--r--mod/pages/lib/pages.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/mod/pages/lib/pages.php b/mod/pages/lib/pages.php
index dbf7b8917..3f27118a6 100644
--- a/mod/pages/lib/pages.php
+++ b/mod/pages/lib/pages.php
@@ -81,6 +81,10 @@ function pages_register_navigation_tree($container) {
'limit' => 0,
));
+ if (!$top_pages) {
+ return;
+ }
+
foreach ($top_pages as $page) {
elgg_register_menu_item('pages_nav', array(
'name' => $page->getGUID(),