From f7fa256e09694c2ed18663bd8e3e0c0ffd20b9e5 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Mon, 18 Jun 2012 17:59:26 -0400 Subject: fixed a warning due to foreach over empty array --- mod/pages/lib/pages.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mod') 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(), -- cgit v1.2.3