From 7cec5a159e163f58b037c9a027be5071e41f2094 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 26 Mar 2011 16:40:19 +0000 Subject: 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 --- engine/lib/pageowner.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engine/lib') 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]; } -- cgit v1.2.3