projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
293b3c1
)
Fix array_search notice from null array in CRM_Core_Permission::event
author
Dave Greenberg
<dave@civicrm.org>
Sun, 30 Jun 2013 18:00:14 +0000
(11:00 -0700)
committer
Dave Greenberg
<dave@civicrm.org>
Sun, 30 Jun 2013 18:00:14 +0000
(11:00 -0700)
CRM/Core/Permission.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Core/Permission.php
b/CRM/Core/Permission.php
index 7ed36300112d33de07f543b90ed8ccc750c43cc8..6ca3f84fe93e9f1f9527f12c579bd8f37dc3e883 100644
(file)
--- 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) {