diff --git a/src/Commands/field/FieldCreateCommands.php b/src/Commands/field/FieldCreateCommands.php index 7688e119f8..310199d281 100644 --- a/src/Commands/field/FieldCreateCommands.php +++ b/src/Commands/field/FieldCreateCommands.php @@ -259,7 +259,7 @@ protected function askExistingFieldName(): ?string { $entityType = $this->input->getArgument('entityType'); $bundle = $this->input->getArgument('bundle'); - $showMachineNames = $this->input->getOption('show-machine-names'); + $showMachineNames = (bool) $this->input->getOption('show-machine-names'); $choices = $this->getExistingFieldStorageOptions($entityType, $bundle, $showMachineNames); if (empty($choices)) {