Skip to content

Commit

Permalink
Ensure $roles is an array when creating users. (#4134)
Browse files Browse the repository at this point in the history
This prevents an error from being thrown when constructing the success message.  See #4133.
  • Loading branch information
ndouglas authored and enzolutions committed Sep 6, 2019
1 parent b34af90 commit b84ad5c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Command/User/CreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
$username = $input->getArgument('username');
$password = $input->getArgument('password');
$roles = $input->getOption('roles');
if (is_string($roles)) {
$roles = explode(',', $roles);
}
$email = $input->getOption('email');
$status = $input->getOption('status');

Expand Down

0 comments on commit b84ad5c

Please sign in to comment.