Skip to content

Commit b84ad5c

Browse files
ndouglasenzolutions
authored andcommitted
Ensure $roles is an array when creating users. (#4134)
This prevents an error from being thrown when constructing the success message. See #4133.
1 parent b34af90 commit b84ad5c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Command/User/CreateCommand.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
108108
$username = $input->getArgument('username');
109109
$password = $input->getArgument('password');
110110
$roles = $input->getOption('roles');
111+
if (is_string($roles)) {
112+
$roles = explode(',', $roles);
113+
}
111114
$email = $input->getOption('email');
112115
$status = $input->getOption('status');
113116

0 commit comments

Comments
 (0)