From bf7444886d611bd99f168cb34c453fb5da7bb5ee Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 14 May 2005 20:50:32 +0000 Subject: [PATCH] r131: Trigger an error if can_perform() is passed an invalid bitmask --- includes/functions.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/functions.php b/includes/functions.php index 4e35bf6..e4a21ab 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -102,6 +102,12 @@ function construct_user_display($userinfo, $userid = true) function can_perform($bitmask, $userinfo = null) { global $_PERMISSION; + + if (!isset($_PERMISSION["$bitmask"])) + { + trigger_error('Invalid bitmask "' . $bitmask . '" specified for can_perform() [includes/functions.php]', E_USER_WARNING); + } + if (!$userinfo) { global $bugsys; -- 2.43.5