diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-09-29 21:41:58 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-09-29 21:41:58 +0000 |
commit | 9708d1b1b4d8a973e926499b59d943d63e1b99d7 (patch) | |
tree | c035c7bc70f4c907ef37264d2ed0da3685481128 /engine | |
parent | c7bbda32e0025d085ce4f7700a1a5d85044e93f1 (diff) | |
download | elgg-9708d1b1b4d8a973e926499b59d943d63e1b99d7.tar.gz elgg-9708d1b1b4d8a973e926499b59d943d63e1b99d7.tar.bz2 |
Checking for menu items before doing a foreach().
git-svn-id: http://code.elgg.org/elgg/trunk@6979 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/elgglib.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index cc6b6a591..3a4fb0467 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -2366,10 +2366,12 @@ function elgg_get_nav_items() { // make sure the url is a valid link. // this prevents disabled plugins leaving behind // valid links when not using a pagehandler. - foreach ($featured_urls_info as $info) { - if (in_array($info->value->url, $valid_urls)) { - $featured_urls[] = $info->value->url; - $featured_urls_sanitised[] = $info; + if ($featured_url_info) { + foreach ($featured_urls_info as $info) { + if (in_array($info->value->url, $valid_urls)) { + $featured_urls[] = $info->value->url; + $featured_urls_sanitised[] = $info; + } } } |