aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-09-29 21:41:58 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-09-29 21:41:58 +0000
commit9708d1b1b4d8a973e926499b59d943d63e1b99d7 (patch)
treec035c7bc70f4c907ef37264d2ed0da3685481128 /engine/lib
parentc7bbda32e0025d085ce4f7700a1a5d85044e93f1 (diff)
downloadelgg-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/lib')
-rw-r--r--engine/lib/elgglib.php10
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;
+ }
}
}