]> granicus.if.org Git - php/commitdiff
Fix environment variable not work in run-tests.php
authortwosee <twose@qq.com>
Mon, 1 Feb 2021 04:56:59 +0000 (12:56 +0800)
committertwosee <twose@qq.com>
Mon, 1 Feb 2021 09:27:19 +0000 (17:27 +0800)
Closes GH-6657.

run-tests.php

index 613b1391e1e1553274ee0d1c6f3e63870499a69b..51758ce5076f3b16b42cefd7c535f508cac52aa8 100755 (executable)
@@ -340,7 +340,7 @@ function main(): void
     if (function_exists('sapi_windows_vt100_support') && !sapi_windows_vt100_support(STDOUT, true)) {
         $colorize = false;
     }
-    if (array_key_exists('NO_COLOR', $_ENV)) {
+    if (array_key_exists('NO_COLOR', $environment)) {
         $colorize = false;
     }
     $selected_tests = false;
@@ -1446,7 +1446,7 @@ function run_all_tests_parallel(array $test_files, array $env, $redir_tested): v
             [], // Inherit our stdin, stdout and stderr
             $pipes,
             null,
-            $_ENV + [
+            $GLOBALS['environment'] + [
                 "TEST_PHP_WORKER" => $i,
                 "TEST_PHP_URI" => $sockUri,
             ],