aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-26 16:40:19 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-26 16:40:19 +0000
commit7cec5a159e163f58b037c9a027be5071e41f2094 (patch)
treedb01d60e6a1cda910f0732467ea3e4d8c3b8c2bd /engine
parent452007688cdb039a0d62bf1688d1c010622ec53e (diff)
downloadelgg-7cec5a159e163f58b037c9a027be5071e41f2094.tar.gz
elgg-7cec5a159e163f58b037c9a027be5071e41f2094.tar.bz2
fixed notice in get_context() when no context is set
git-svn-id: http://code.elgg.org/elgg/trunk@8846 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/pageowner.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/engine/lib/pageowner.php b/engine/lib/pageowner.php
index 065a96bc2..504d34a4e 100644
--- a/engine/lib/pageowner.php
+++ b/engine/lib/pageowner.php
@@ -204,6 +204,10 @@ function elgg_set_context($context) {
function elgg_get_context() {
global $CONFIG;
+ if (!$CONFIG->context) {
+ return null;
+ }
+
return $CONFIG->context[count($CONFIG->context) - 1];
}