diff --git a/src/Configuration.php b/src/Configuration.php index df551e9c..2394a2ea 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -269,6 +269,9 @@ public function save(): void $securityConfig = $this->getSecurityConfig(); if (($this->configuration['general']['active'] ?? false) && isset($securityConfig['method']) && $securityConfig['method'] === self::SECURITYCONFIG_AUTH_APIKEY) { + if (!is_array($securityConfig['apikey'])) { + $securityConfig['apikey'] = [$securityConfig['apikey']]; + } foreach ($securityConfig['apikey'] as $apiKey) { if (strlen($apiKey) < 16) { throw new \Exception('API key ' . $apiKey . ' does not satisfy the minimum length of 16 characters');