Flexible heredoc syntax is only available since PHP 7.3.
Closes GH-5444.
}
// write .sh
- if (strpos($log_format, 'S') !== false && file_put_contents($sh_filename, <<<SH
+ $sh_script = <<<SH
#!/bin/sh
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);