diff --git a/module/VuFind/src/VuFind/Role/DynamicRoleProvider.php b/module/VuFind/src/VuFind/Role/DynamicRoleProvider.php
index 9eea642426c226a131adf726d3b3c898230e15eb..a389f54fed4937461bc1c171275d22d50e2f94db 100644
--- a/module/VuFind/src/VuFind/Role/DynamicRoleProvider.php
+++ b/module/VuFind/src/VuFind/Role/DynamicRoleProvider.php
@@ -140,12 +140,14 @@ class DynamicRoleProvider implements RoleProviderInterface
         $retVal = [];
         foreach ($this->config as $settings) {
             $current = $this->getRolesForSettings($settings);
-            foreach ($current['roles'] as $role) {
-                if (!isset($retVal[$role])) {
-                    $retVal[$role] = [];
-                }
-                foreach ($current['permissions'] as $permission) {
-                    $retVal[$role][] = $permission;
+            if (null !== $current['roles']) {
+                foreach ($current['roles'] as $role) {
+                    if (!isset($retVal[$role])) {
+                        $retVal[$role] = [];
+                    }
+                    foreach ($current['permissions'] as $permission) {
+                        $retVal[$role][] = $permission;
+                    }
                 }
             }
         }