N°7629: improve InterfaceDiscovery::GetCandidateClasses robustness

This commit is contained in:
odain
2026-01-09 11:50:33 +01:00
parent d1e91087b9
commit 43bd621731

View File

@@ -178,6 +178,13 @@ class InterfaceDiscovery
continue;
}
$aTmpClassMap = include $sAutoloadFile;
if (! is_array($aTmpClassMap)) {
//can happen when setup compilation broken in the middle
//ex: $sAutoloadFile could be empty and $aTmpClassMap is a int
$aAutoloaderErrors[] = $sAutoloadFile;
continue;
}
/** @noinspection SlowArrayOperationsInLoopInspection we are getting an associative array so the documented workarounds cannot be used */
$aClassMap = array_merge($aClassMap, $aTmpClassMap);
}