aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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];
}