diff --git a/Services/AccessControl/classes/class.ilRoleXmlImporter.php b/Services/AccessControl/classes/class.ilRoleXmlImporter.php index 6e8c7cd9e8e7..1bb0a239f020 100644 --- a/Services/AccessControl/classes/class.ilRoleXmlImporter.php +++ b/Services/AccessControl/classes/class.ilRoleXmlImporter.php @@ -162,8 +162,12 @@ public function importSimpleXml(SimpleXMLElement $role) foreach ($role->operations as $sxml_operations) { foreach ($sxml_operations as $sxml_op) { + $operation = trim((string) $sxml_op); + if (!array_key_exists($operation, $operations)) { + continue; + } $ops_group = (string) $sxml_op['group']; - $ops_id = (int) $operations[trim((string) $sxml_op)]; + $ops_id = (int) $operations[$operation]; $ops = trim((string) $sxml_op); if ($ops_group and $ops_id) {