diff --git a/src/Service/LDAPApi.php b/src/Service/LDAPApi.php index 25bfbe082f2981d9f9548a3e71af16a8081b91c4..0dc83eac1a6e84e72ee7945996f53116bd71d518 100644 --- a/src/Service/LDAPApi.php +++ b/src/Service/LDAPApi.php @@ -298,6 +298,11 @@ class LDAPApi implements LoggerAwareInterface, ServiceSubscriberInterface $person = $this->getCurrentPerson(); if ($person !== null) { $roles = $person->getExtraData('ldap-roles'); + + if ($roles === null) { + return []; + } + assert(is_array($roles)); return $roles;