summaryrefslogtreecommitdiff
path: root/run-tests.php
diff options
context:
space:
mode:
authorFlávio Heleno <flaviohbatista@gmail.com>2020-04-23 22:26:35 -0300
committerNikita Popov <nikita.ppv@gmail.com>2020-04-27 11:55:40 +0200
commit1baa58317f2bbe46d6a0d36a59fbe298e3006977 (patch)
tree1df1a8bcbb95b053963f6ccc47d9cbd5073ff514 /run-tests.php
parentbbb8b95dbd12aba5524547f93858331ad2d95cbf (diff)
downloadphp-git-1baa58317f2bbe46d6a0d36a59fbe298e3006977.tar.gz
Fixed run-tests.php for PHP 7.2
Flexible heredoc syntax is only available since PHP 7.3. Closes GH-5444.
Diffstat (limited to 'run-tests.php')
-rwxr-xr-xrun-tests.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/run-tests.php b/run-tests.php
index b708f73c72..ffdb72a00e 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -2748,7 +2748,7 @@ COMMAND $cmd
}
// write .sh
- if (strpos($log_format, 'S') !== false && file_put_contents($sh_filename, <<<SH
+ $sh_script = <<<SH
#!/bin/sh
case "$1" in
@@ -2765,7 +2765,8 @@ case "$1" in
{$cmd}
;;
esac
-SH, FILE_BINARY) === false) {
+SH;
+ if (strpos($log_format, 'S') !== false && file_put_contents($sh_filename, $sh_script, FILE_BINARY) === false) {
error("Cannot create test shell script - $sh_filename");
}
chmod($sh_filename, 0755);