Skip to content

Commit

Permalink
Merge pull request #129 from zipofar/patch-1
Browse files Browse the repository at this point in the history
Fix potential endless loop in prompt()
  • Loading branch information
schlessera authored Apr 10, 2018
2 parents e4cb9fd + 390fe3f commit dcdef5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cli/Streams.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public static function prompt( $question, $default = null, $marker = ': ', $hide
self::out( $question . $marker );
$line = self::input( null, $hide );

if( !empty( $line ) )
if ( trim( $line ) !== '' )
return $line;
if( $default !== false )
return $default;
Expand Down

0 comments on commit dcdef5d

Please sign in to comment.