Skip to content

Commit

Permalink
Fix: Gracefully handle empty user input in run-tests.php
Browse files Browse the repository at this point in the history
Closes GH-6016.
  • Loading branch information
Berbe authored and nikic committed Aug 24, 2020
1 parent 32c6a0b commit bfeb2f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run-tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit bfeb2f6

Please sign in to comment.