diff --git a/src/Command/Generate/PluginBlockCommand.php b/src/Command/Generate/PluginBlockCommand.php index 51590c98b..977b0ac8d 100644 --- a/src/Command/Generate/PluginBlockCommand.php +++ b/src/Command/Generate/PluginBlockCommand.php @@ -264,7 +264,7 @@ function ($class) { $themeRegion = $this->getIo()->choiceNoList( $this->trans('commands.generate.plugin.block.questions.theme-region'), array_values($themeRegions), - null, + '', true ); $themeRegion = array_search($themeRegion, $themeRegions); diff --git a/src/Command/Migrate/ExecuteCommand.php b/src/Command/Migrate/ExecuteCommand.php index 941bd192e..c2f6334a7 100644 --- a/src/Command/Migrate/ExecuteCommand.php +++ b/src/Command/Migrate/ExecuteCommand.php @@ -251,11 +251,11 @@ protected function interact(InputInterface $input, OutputInterface $output) $exclude_id = $this->getIo()->choiceNoList( $this->trans('commands.migrate.execute.questions.exclude-id'), array_keys($migrations_list), - null, + '', true ); - if (empty($exclude_id)) { + if (empty($exclude_id) || is_numeric($exclude_id)) { break; } else { unset($migrations_list[$exclude_id]); diff --git a/src/Command/Role/DeleteCommand.php b/src/Command/Role/DeleteCommand.php index 918af84e6..78411a9dc 100644 --- a/src/Command/Role/DeleteCommand.php +++ b/src/Command/Role/DeleteCommand.php @@ -125,11 +125,11 @@ protected function interact(InputInterface $input, OutputInterface $output) $role = $this->getIo()->choiceNoList( $this->trans('commands.common.questions.roles.name'), $roles, - null, + '', true ); $role = trim($role); - if (empty($role)) { + if (empty($role) || is_numeric($role)) { break; } diff --git a/src/Command/Shared/EventsTrait.php b/src/Command/Shared/EventsTrait.php index 40bdbe5c5..bb8ce10ea 100644 --- a/src/Command/Shared/EventsTrait.php +++ b/src/Command/Shared/EventsTrait.php @@ -28,11 +28,11 @@ public function eventsQuestion() $event = $this->getIo()->choiceNoList( $this->trans('commands.common.questions.events.name'), $events, - null, + '', true ); - if (empty($event)) { + if (empty($event) || is_numeric($event)) { break; } diff --git a/src/Command/Shared/FormTrait.php b/src/Command/Shared/FormTrait.php index 82aec3929..c611d8078 100644 --- a/src/Command/Shared/FormTrait.php +++ b/src/Command/Shared/FormTrait.php @@ -46,11 +46,11 @@ public function formQuestion() $input_type = $this->getIo()->choiceNoList( $this->trans('commands.common.questions.inputs.type'), $input_types, - null, + '', true ); - if (empty($input_type)) { + if (empty($input_type) || is_numeric($input_type)) { break; } @@ -78,7 +78,7 @@ public function formQuestion() $inputFieldSet = $this->getIo()->choiceNoList( $this->trans('commands.common.questions.inputs.fieldset'), $fieldSets, - null, + '', true ); diff --git a/src/Command/Shared/ProjectDownloadTrait.php b/src/Command/Shared/ProjectDownloadTrait.php index 9193ded21..88b5cff6e 100644 --- a/src/Command/Shared/ProjectDownloadTrait.php +++ b/src/Command/Shared/ProjectDownloadTrait.php @@ -33,11 +33,11 @@ public function modulesQuestion() $moduleName = $this->getIo()->choiceNoList( $this->trans('commands.module.install.questions.module'), $modules, - null, + '', true ); - if (empty($moduleName)) { + if (empty($moduleName) && is_numeric($moduleName)) { break; } @@ -65,11 +65,11 @@ public function modulesUninstallQuestion() $moduleName = $this->getIo()->choiceNoList( $this->trans('commands.module.uninstall.questions.module'), $modules, - null, + '', true ); - if (empty($moduleName)) { + if (empty($moduleName) || is_numeric($modules)) { break; } diff --git a/src/Command/Theme/InstallCommand.php b/src/Command/Theme/InstallCommand.php index b1155ddec..8c6a9b37f 100644 --- a/src/Command/Theme/InstallCommand.php +++ b/src/Command/Theme/InstallCommand.php @@ -100,11 +100,11 @@ protected function interact(InputInterface $input, OutputInterface $output) $theme_name = $this->getIo()->choiceNoList( $this->trans('commands.theme.install.questions.theme'), array_keys($theme_list), - null, + '', true ); - if (empty($theme_name)) { + if (empty($theme_name) || is_numeric($theme_name)) { break; } diff --git a/src/Command/Theme/UninstallCommand.php b/src/Command/Theme/UninstallCommand.php index 0dfe378b0..786b4c4d8 100644 --- a/src/Command/Theme/UninstallCommand.php +++ b/src/Command/Theme/UninstallCommand.php @@ -93,11 +93,11 @@ protected function interact(InputInterface $input, OutputInterface $output) $theme_name = $this->getIo()->choiceNoList( $this->trans('commands.theme.uninstall.questions.theme'), array_keys($theme_list), - null, + '', true ); - if (empty($theme_name)) { + if (empty($theme_name) || is_numeric($theme_name)) { break; }