Disabled role causes php notices
authorFranky Van Liedekerke <liedekef@localhost.localdomain>
Fri, 12 Aug 2016 08:00:51 +0000 (10:00 +0200)
committerFranky Van Liedekerke <liedekef@localhost.localdomain>
Fri, 12 Aug 2016 08:00:51 +0000 (10:00 +0200)
CRM/ACL/Page/ACL.php
CRM/ACL/Page/EntityRole.php

index 0e0da8ed2a69e31a407b89fe53dc3aa056f0278f..0131eee3d067d5a26e2103e38fdf5dc1857bb9d9 100644 (file)
@@ -185,7 +185,7 @@ ORDER BY entity_id
       $acl[$dao->id]['is_active'] = $dao->is_active;
 
       if ($acl[$dao->id]['entity_id']) {
-        $acl[$dao->id]['entity'] = $roles[$acl[$dao->id]['entity_id']];
+        $acl[$dao->id]['entity'] = CRM_Utils_Array::value($acl[$dao->id]['entity_id'], $roles);
       }
       else {
         $acl[$dao->id]['entity'] = ts('Everyone');
index 44dbff44ef432fae420dab02b06a3fe16280dec6..a98a4cac02e8d82db65f6c01f24abbf38df78791 100644 (file)
@@ -154,7 +154,7 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic {
       $entityRoles[$dao->id] = array();
       CRM_Core_DAO::storeValues($dao, $entityRoles[$dao->id]);
 
-      $entityRoles[$dao->id]['acl_role'] = $aclRoles[$dao->acl_role_id];
+      $entityRoles[$dao->id]['acl_role'] = CRM_Utils_Array::value($dao->acl_role_id, $aclRoles);
       $entityRoles[$dao->id]['entity'] = $groups[$dao->entity_id];
 
       // form all action links