diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php index 03a5fa2ae..0d455b7e3 100644 --- a/src/Composer/Factory.php +++ b/src/Composer/Factory.php @@ -681,7 +681,7 @@ class Factory private static function useXdg(): bool { foreach (array_keys($_SERVER) as $key) { - if (strpos($key, 'XDG_') === 0) { + if (strpos((string) $key, 'XDG_') === 0) { return true; } }