From cb5f5599341a2bf76e83064ce8a52b8012f05831 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Wed, 22 Dec 2010 12:02:43 +0100 Subject: [PATCH] Return booleans. --- framework/Perms/lib/Horde/Perms.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/Perms/lib/Horde/Perms.php b/framework/Perms/lib/Horde/Perms.php index 0aad5b754..d8ea366d7 100644 --- a/framework/Perms/lib/Horde/Perms.php +++ b/framework/Perms/lib/Horde/Perms.php @@ -423,7 +423,7 @@ class Horde_Perms */ public function hasPermission($permission, $user, $perm, $creator = null) { - return ($this->getPermissions($permission, $user, $creator) & $perm); + return (bool)($this->getPermissions($permission, $user, $creator) & $perm); } /** @@ -460,7 +460,7 @@ class Horde_Perms ); try { - return $GLOBALS['registry']->callAppMethod($app, 'hasPermission', array('args' => $args)); + return (bool)$GLOBALS['registry']->callAppMethod($app, 'hasPermission', array('args' => $args)); } catch (Horde_Exception $e) {} } -- 2.11.0