From bfeb2f6abc35309f25074410ee7eb61f59c22274 Mon Sep 17 00:00:00 2001 From: Berbe <4251220+Berbe@users.noreply.github.com> Date: Wed, 19 Aug 2020 02:44:53 +0200 Subject: Fix: Gracefully handle empty user input in run-tests.php Closes GH-6016. --- run-tests.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit v1.2.1