Fix warning when user doesn't have edit permissions
authorMatthew Wire <devel@mrwire.co.uk>
Tue, 6 Oct 2015 23:08:59 +0000 (00:08 +0100)
committerMatthew Wire <devel@mrwire.co.uk>
Tue, 6 Oct 2015 23:08:59 +0000 (00:08 +0100)
CRM/Event/BAO/Event.php

index bed2f55a8f2956625212081dd26fc43e8a6f0507..d7653063ab0e280cae4baa250ae3439fd44d7b60 100644 (file)
@@ -475,7 +475,8 @@ $event_summary_limit
             }
 
             $eventSummary['events'][$dao->id][$property] = $set;
-            if (in_array($dao->id, $permissions[CRM_Core_Permission::EDIT])) {
+            if (is_array($permissions[CRM_Core_Permission::EDIT])
+              && in_array($dao->id, $permissions[CRM_Core_Permission::EDIT])) {
               $eventSummary['events'][$dao->id]['configure'] = CRM_Utils_System::url('civicrm/admin/event', "action=update&id=$dao->id&reset=1");
             }
             break;