IcingaObjectImports: fix PHP 8.1 notice

This commit is contained in:
Thomas Gelf 2021-12-21 09:01:06 +01:00
parent 27e5e72f41
commit 68814e0de6
1 changed files with 1 additions and 1 deletions

View File

@ -198,7 +198,7 @@ class IcingaObjectImports implements Iterator, Countable, IcingaConfigRenderer
if (is_array($import)) { if (is_array($import)) {
foreach ($import as $i) { foreach ($import as $i) {
// Gracefully ignore null members or empty strings // Gracefully ignore null members or empty strings
if (! $i instanceof $class && strlen($i) === 0) { if (! $i instanceof $class && ($i === null || strlen($i) === 0)) {
continue; continue;
} }