diff options
author | Berbe <4251220+Berbe@users.noreply.github.com> | 2020-08-19 02:44:53 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-08-24 11:46:01 +0200 |
commit | bfeb2f6abc35309f25074410ee7eb61f59c22274 (patch) | |
tree | 41c178d19a6f468a1326c2f648577b4a5ee317d0 /run-tests.php | |
parent | 32c6a0bbbbeddc93d14273326ecd3604961d3f0d (diff) | |
download | php-git-bfeb2f6abc35309f25074410ee7eb61f59c22274.tar.gz |
Fix: Gracefully handle empty user input in run-tests.php
Closes GH-6016.
Diffstat (limited to 'run-tests.php')
-rwxr-xr-x | run-tests.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/run-tests.php b/run-tests.php index af9f309bc6..8d62c83375 100755 --- a/run-tests.php +++ b/run-tests.php @@ -942,7 +942,7 @@ function save_or_mail_results(): void flush(); $user_input = fgets($fp, 10); - $just_save_results = (strtolower($user_input[0]) == 's'); + $just_save_results = (!empty($user_input) && strtolower($user_input[0]) === 's'); } if ($just_save_results || !getenv('NO_INTERACTION') || TRAVIS_CI) { |