From c1c7deb9fe7e4b84557ed0f37f9bade1459958fb Mon Sep 17 00:00:00 2001 From: Jesus Manuel Olivas Date: Mon, 22 Jan 2018 13:49:50 -0800 Subject: [PATCH] [generate:command] Replace null with empty string as default value on choiceNoList. (#3728) --- src/Command/Shared/ServicesTrait.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Command/Shared/ServicesTrait.php b/src/Command/Shared/ServicesTrait.php index 3fef1aa91..0323dd3b0 100644 --- a/src/Command/Shared/ServicesTrait.php +++ b/src/Command/Shared/ServicesTrait.php @@ -22,16 +22,17 @@ public function servicesQuestion() $service_collection = []; $this->getIo()->writeln($this->trans('commands.common.questions.services.message')); $services = $this->container->getServiceIds(); + while (true) { $service = $this->getIo()->choiceNoList( $this->trans('commands.common.questions.services.name'), $services, - null, + '', true ); $service = trim($service); - if (empty($service)) { + if (empty($service) || is_numeric($service)) { break; }