diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-11-30 11:40:46 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-11-30 11:40:46 +0100 |
commit | 15073d8e1da5f7c140acbed0bee0c09439a1cfac (patch) | |
tree | 5a46f3ec190c0f2cecf16f164fe36f0692f4d44f /run-tests.php | |
parent | fdb05b92bfb62906771fd41f3fcdbc184d89e3fe (diff) | |
download | php-git-15073d8e1da5f7c140acbed0bee0c09439a1cfac.tar.gz |
Fixed bug #80437
Only chmod if the file has been created.
Diffstat (limited to 'run-tests.php')
-rwxr-xr-x | run-tests.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/run-tests.php b/run-tests.php index 00881cf779..a34434b753 100755 --- a/run-tests.php +++ b/run-tests.php @@ -2776,7 +2776,8 @@ COMMAND $cmd } // write .sh - $sh_script = <<<SH + if (strpos($log_format, 'S') !== false) { + $sh_script = <<<SH #!/bin/sh case "$1" in @@ -2794,10 +2795,11 @@ case "$1" in ;; esac SH; - if (strpos($log_format, 'S') !== false && file_put_contents($sh_filename, $sh_script) === false) { - error("Cannot create test shell script - $sh_filename"); + if (file_put_contents($sh_filename, $sh_script) === false) { + error("Cannot create test shell script - $sh_filename"); + } + chmod($sh_filename, 0755); } - chmod($sh_filename, 0755); // write .log if (strpos($log_format, 'L') !== false && file_put_contents($log_filename, " |