From: cash Date: Sat, 26 Mar 2011 16:40:19 +0000 (+0000) Subject: fixed notice in get_context() when no context is set X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=7cec5a159e163f58b037c9a027be5071e41f2094;p=lorea%2Felgg.git 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 --- 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]; }