From 1cc3294ee721992aa7ffe410c709cd0fab81a30a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Vigh?= Date: Sat, 8 May 2021 16:19:49 +0200 Subject: [PATCH] check the user type if it has valid value --- src/Cli/AddUserCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cli/AddUserCommand.php b/src/Cli/AddUserCommand.php index 7ea8256..b63a0d2 100644 --- a/src/Cli/AddUserCommand.php +++ b/src/Cli/AddUserCommand.php @@ -27,7 +27,7 @@ class AddUserCommand extends Command $user->setActive(true); $user->setCreatedDate(new DateTime()); - if ($input->hasArgument('type')) { + if ($input->hasArgument('type') && $input->getArgument('type') !== null) { $user->setType($input->getArgument('type')); }