Skip to content

Commit 53102a4

Browse files
Check if backend is null before passing it to strtolower
Passing null to non nullable parameters of built-in functions is deprecated since PHP-8.1
1 parent 4c0016d commit 53102a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/Icinga/Authentication/User/UserBackend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public static function create($name, ?ConfigObject $backendConfig = null)
181181
$name = $backendConfig->name;
182182
}
183183

184-
if (! ($backendType = strtolower($backendConfig->backend))) {
184+
if ($backendConfig->backend === null || ! ($backendType = strtolower($backendConfig->backend))) {
185185
throw new ConfigurationError(
186186
'Authentication configuration for user backend "%s" is missing the \'backend\' directive',
187187
$name

0 commit comments

Comments
 (0)