@@ -2221,10 +2221,19 @@ function run_test(string $php, $file, array $env): string
22212221
22222222 if ($ test ->sectionNotEmpty ('SKIPIF ' )) {
22232223 show_file_block ('skip ' , $ test ->getSection ('SKIPIF ' ));
2224+ $ skipEnv = $ env ;
2225+ if (!IS_WINDOWS ) {
2226+ unset(
2227+ $ skipEnv ['REQUEST_METHOD ' ],
2228+ $ skipEnv ['QUERY_STRING ' ],
2229+ $ skipEnv ['PATH_TRANSLATED ' ],
2230+ $ skipEnv ['SCRIPT_FILENAME ' ],
2231+ );
2232+ }
22242233
22252234 if ($ valgrind ) {
2226- $ env ['USE_ZEND_ALLOC ' ] = '0 ' ;
2227- $ env ['ZEND_DONT_UNLOAD_MODULES ' ] = 1 ;
2235+ $ skipEnv ['USE_ZEND_ALLOC ' ] = '0 ' ;
2236+ $ skipEnv ['ZEND_DONT_UNLOAD_MODULES ' ] = 1 ;
22282237 }
22292238
22302239 $ junit ->startTimer ($ shortname );
@@ -2246,7 +2255,7 @@ function run_test(string $php, $file, array $env): string
22462255 '-d ' ,
22472256 'display_startup_errors=0 ' ,
22482257 ];
2249- $ output = $ skipCache ->checkSkip ($ commandLine , $ test ->getSection ('SKIPIF ' ), $ test_skipif , $ temp_skipif , $ env );
2258+ $ output = $ skipCache ->checkSkip ($ commandLine , $ test ->getSection ('SKIPIF ' ), $ test_skipif , $ temp_skipif , $ skipEnv );
22502259
22512260 $ time = microtime (true ) - $ startTime ;
22522261 $ junit ->stopTimer ($ shortname );
0 commit comments