summaryrefslogtreecommitdiff
path: root/run-tests.php
diff options
context:
space:
mode:
Diffstat (limited to 'run-tests.php')
-rwxr-xr-xrun-tests.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/run-tests.php b/run-tests.php
index fd4e12081f..0dcf21bcbf 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -1366,6 +1366,7 @@ TEST $file
return 'SKIPPED';
}
}
+ $uses_cgi = true;
}
/* For phpdbg tests, check if phpdbg sapi is available and if it is, use it. */
@@ -1916,7 +1917,7 @@ COMMAND $cmd
/* when using CGI, strip the headers from the output */
$headers = "";
- if (isset($old_php) && preg_match("/^(.*?)\r?\n\r?\n(.*)/s", $out, $match)) {
+ if (!empty($uses_cgi) && preg_match("/^(.*?)\r?\n\r?\n(.*)/s", $out, $match)) {
$output = trim($match[2]);
$rh = preg_split("/[\n\r]+/", $match[1]);
$headers = array();