Skip to content

Commit 1baa583

Browse files
flaviohelenonikic
authored andcommitted
Fixed run-tests.php for PHP 7.2
Flexible heredoc syntax is only available since PHP 7.3. Closes GH-5444.
1 parent bbb8b95 commit 1baa583

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

run-tests.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,7 +2748,7 @@ function run_test($php, $file, $env)
27482748
}
27492749

27502750
// write .sh
2751-
if (strpos($log_format, 'S') !== false && file_put_contents($sh_filename, <<<SH
2751+
$sh_script = <<<SH
27522752
#!/bin/sh
27532753
27542754
case "$1" in
@@ -2765,7 +2765,8 @@ function run_test($php, $file, $env)
27652765
{$cmd}
27662766
;;
27672767
esac
2768-
SH, FILE_BINARY) === false) {
2768+
SH;
2769+
if (strpos($log_format, 'S') !== false && file_put_contents($sh_filename, $sh_script, FILE_BINARY) === false) {
27692770
error("Cannot create test shell script - $sh_filename");
27702771
}
27712772
chmod($sh_filename, 0755);

0 commit comments

Comments
 (0)