File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -330,7 +330,9 @@ public static function promptByMultipleKeys(string $text, array $options): array
330330 CLI ::write ($ text );
331331 CLI ::printKeysAndValues ($ options );
332332 CLI ::newLine ();
333- $ input = static ::prompt ($ extraOutput ) ?: 0 ; // 0 is default
333+
334+ $ input = static ::prompt ($ extraOutput );
335+ $ input = ($ input === '' ) ? '0 ' : $ input ; // 0 is default
334336
335337 // validation
336338 while (true ) {
@@ -349,7 +351,9 @@ public static function promptByMultipleKeys(string $text, array $options): array
349351 if (! $ pattern || $ maxOptions < $ maxInput ) {
350352 static ::error ('Please select correctly. ' );
351353 CLI ::newLine ();
352- $ input = static ::prompt ($ extraOutput ) ?: 0 ;
354+
355+ $ input = static ::prompt ($ extraOutput );
356+ $ input = ($ input === '' ) ? '0 ' : $ input ;
353357 } else {
354358 break ;
355359 }
You can’t perform that action at this time.
0 commit comments