Ensure integer env vars do not cause a crash, fixes #11908
parent
dd18a5fe55
commit
f01ec4a98f
|
@ -681,7 +681,7 @@ class Factory
|
||||||
private static function useXdg(): bool
|
private static function useXdg(): bool
|
||||||
{
|
{
|
||||||
foreach (array_keys($_SERVER) as $key) {
|
foreach (array_keys($_SERVER) as $key) {
|
||||||
if (strpos($key, 'XDG_') === 0) {
|
if (strpos((string) $key, 'XDG_') === 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue