summaryrefslogtreecommitdiff
path: root/run-tests.php
diff options
context:
space:
mode:
authorBerbe <4251220+Berbe@users.noreply.github.com>2020-08-19 02:44:53 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-08-24 11:46:01 +0200
commitbfeb2f6abc35309f25074410ee7eb61f59c22274 (patch)
tree41c178d19a6f468a1326c2f648577b4a5ee317d0 /run-tests.php
parent32c6a0bbbbeddc93d14273326ecd3604961d3f0d (diff)
downloadphp-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-xrun-tests.php2
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) {