Skip to content

Commit

Permalink
Fix default value of the field:create cardinality option (#4951)
Browse files Browse the repository at this point in the history
Since the Cancel option is removed from choice lists (#4907), the numerical indexes changed. Commands that use an indexed array for options and that have a default value will have to update that default value. I haven't found another occurrence of this issue in Drush core.
  • Loading branch information
DieterHolvoet committed Dec 27, 2021
1 parent eb41746 commit fbe4980
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Drupal/Commands/field/FieldCreateCommands.php
Expand Up @@ -346,7 +346,7 @@ protected function askCardinality(): int
$cardinality = $this->io()->choice(
'Allowed number of values',
array_combine($choices, $choices),
1
0
);

$limit = FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED;
Expand Down

0 comments on commit fbe4980

Please sign in to comment.