Skip to content

Commit bfeb2f6

Browse files
Berbenikic
authored andcommitted
Fix: Gracefully handle empty user input in run-tests.php
Closes GH-6016.
1 parent 32c6a0b commit bfeb2f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

run-tests.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ function save_or_mail_results(): void
942942
flush();
943943

944944
$user_input = fgets($fp, 10);
945-
$just_save_results = (strtolower($user_input[0]) == 's');
945+
$just_save_results = (!empty($user_input) && strtolower($user_input[0]) === 's');
946946
}
947947

948948
if ($just_save_results || !getenv('NO_INTERACTION') || TRAVIS_CI) {

0 commit comments

Comments
 (0)