]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
fixed a warning due to foreach over empty array
authorCash Costello <cash.costello@gmail.com>
Mon, 18 Jun 2012 21:59:26 +0000 (17:59 -0400)
committerCash Costello <cash.costello@gmail.com>
Mon, 18 Jun 2012 21:59:26 +0000 (17:59 -0400)
mod/pages/lib/pages.php

index dbf7b8917af1d2ddcec63abd8a8849367218d2e4..3f27118a6d2c6fd14a695aa7cfbc5b78ff158010 100644 (file)
@@ -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(),