Skip to content
Snippets Groups Projects
Commit d551c85d authored by Dave Greenberg's avatar Dave Greenberg
Browse files

Fix array_search notice from null array in CRM_Core_Permission::event

parent 293b3c17
Branches
Tags
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment