Skip to content
Snippets Groups Projects
Commit 770d17d9 authored by colemanw's avatar colemanw
Browse files

Merge pull request #1080 from davecivicrm/eventPermissionNoticeFix

Fix array_search notice from null array in CRM_Core_Permission::event
parents 4bd2035d d551c85d
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