]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
fixed notice in get_context() when no context is set
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 26 Mar 2011 16:40:19 +0000 (16:40 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 26 Mar 2011 16:40:19 +0000 (16:40 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8846 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/pageowner.php

index 065a96bc2adcbe8087337545c9f469e46b7e23cd..504d34a4e655cc83b939c5d2be7a53272949929e 100644 (file)
@@ -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];
 }