Skip to content

Commit 2f33b4a

Browse files
authored
Update ConfiguresPrompts.php
1 parent 503a700 commit 2f33b4a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Illuminate/Console/Concerns/ConfiguresPrompts.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Illuminate\Console\Concerns;
44

55
use Illuminate\Console\PromptValidationException;
6+
use Illuminate\Support\Arr;
67
use Laravel\Prompts\ConfirmPrompt;
78
use Laravel\Prompts\MultiSearchPrompt;
89
use Laravel\Prompts\MultiSelectPrompt;
@@ -269,6 +270,7 @@ private function multiselectFallback($label, $options, $default = [], $required
269270
}
270271

271272
if ($required === false) {
273+
$answers = Arr::wrap($answers);
272274
return array_is_list($options)
273275
? array_values(array_filter($answers, fn ($value) => $value !== 'None'))
274276
: array_filter($answers, fn ($value) => $value !== '');

0 commit comments

Comments
 (0)