From 87995e28bab9a291db54da3faca90e2336066cbe Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 22 Jan 2013 14:31:22 -0500 Subject: addresses pull request 472 - group not having an owner is a serious problem - try exception approach - maybe we need a mechanism for displaying an error page besides exceptions --- mod/groups/views/default/groups/profile/summary.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mod/groups/views/default') diff --git a/mod/groups/views/default/groups/profile/summary.php b/mod/groups/views/default/groups/profile/summary.php index 6eca9745e..261a746d1 100644 --- a/mod/groups/views/default/groups/profile/summary.php +++ b/mod/groups/views/default/groups/profile/summary.php @@ -15,8 +15,10 @@ if (!isset($vars['entity']) || !$vars['entity']) { $group = $vars['entity']; $owner = $group->getOwnerEntity(); -if (!$owner) { - return true; +if ($owner) { + // not having an owner is very bad so we throw an exception + $msg = elgg_echo('InvalidParameterException:IdNotExistForGUID', array('group owner', $group->guid)); + throw new InvalidParameterException($msg); } ?> -- cgit v1.2.3