From 9305dea128a751b42287577e8314c462c8dca0e2 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 7 Jan 2022 13:50:00 +0100 Subject: [PATCH] Only run getenv workaround on PHP 7.1.13+ --- bin/composer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/composer b/bin/composer index 32c45bcda..6aaa4533d 100755 --- a/bin/composer +++ b/bin/composer @@ -67,7 +67,7 @@ if (function_exists('ini_set')) { // Workaround PHP bug on Windows where env vars containing Unicode chars are mangled in $_SERVER // see https://github.com/php/php-src/issues/7896 -if (Platform::isWindows()) { +if (PHP_VERSION_ID >= 70113 && Platform::isWindows()) { $_SERVER = array_merge($_SERVER, array_intersect_ukey($_SERVER, getenv(), 'strcasecmp')); }