From d551c85d4e0731b6e194193da37700301a032110 Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Sun, 30 Jun 2013 11:00:14 -0700 Subject: [PATCH] Fix array_search notice from null array in CRM_Core_Permission::event --- CRM/Core/Permission.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Permission.php b/CRM/Core/Permission.php index 7ed3630011..6ca3f84fe9 100644 --- a/CRM/Core/Permission.php +++ b/CRM/Core/Permission.php @@ -279,7 +279,11 @@ class CRM_Core_Permission { if (!$eventID) { return $permissionedEvents; } - return array_search($eventID, $permissionedEvents) === FALSE ? NULL : $eventID; + if (!empty($permissionedEvents)){ + return array_search($eventID, $permissionedEvents) === FALSE ? NULL : $eventID; + } else { + return $eventID; + } } static function eventClause($type = CRM_Core_Permission::VIEW, $prefix = NULL) { -- 2.25.1