From: Christoph M. Becker Date: Mon, 30 Oct 2017 20:04:59 +0000 (+0100) Subject: Implemented request #62055 (Make run-tests.php support --CGI-- sections) X-Git-Tag: php-7.3.0alpha1~1141 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc4427d0caf2d066cd01f91fd0e899217fbceb30;p=php Implemented request #62055 (Make run-tests.php support --CGI-- sections) Not regarding the CGI section might even been seen as a bug, and since server-tests.php appears to broken, anway[1][2], we implement it for run-tests.php in the way as described[3] for server-tests.php, i.e. respective tests are skipped if no CGI executable is found. [1] [2] [3] --- diff --git a/NEWS b/NEWS index 6e95adb2a1..7834c293d2 100644 --- a/NEWS +++ b/NEWS @@ -119,6 +119,10 @@ PHP NEWS . Fixed unzserialize(), to disable creation of unsupported data structures through manually crafted strings. (Dmitry) +- Testing: + . Implemented request #62055 (Make run-tests.php support --CGI-- sections). + (cmb) + - Zlib: . Added zlib/level context option for compress.zlib wrapper. (Sara) diff --git a/run-tests.php b/run-tests.php index 5694df9ff6..1742514b5d 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1406,7 +1406,7 @@ TEST $file $tested = trim($section_text['TEST']); /* For GET/POST/PUT tests, check if cgi sapi is available and if it is, use it. */ - if (!empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['GZIP_POST']) || !empty($section_text['DEFLATE_POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['PUT']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) { + if (array_key_exists('CGI', $section_text) || !empty($section_text['GET']) || !empty($section_text['POST']) || !empty($section_text['GZIP_POST']) || !empty($section_text['DEFLATE_POST']) || !empty($section_text['POST_RAW']) || !empty($section_text['PUT']) || !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) { if (isset($php_cgi)) { $old_php = $php; $php = $php_cgi . ' -C ';