Skip to content

Commit

Permalink
Fix array_unique() expects parameter 1 to be array. (#3443)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas authored Jul 16, 2017
1 parent 118b2ad commit c5f60ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ private function registerCommands()

if (array_key_exists($command->getName(), $aliases)) {
$commandAliases = array_unique(array_merge(
$command->getAliases(),
$aliases[$command->getName()]
$command->getAliases()?$command->getAliases():[],
array_key_exists($command->getName(), $aliases)?$aliases[$command->getName()]:[]
));
if (!is_array($commandAliases)) {
$commandAliases = [$commandAliases];
Expand Down

0 comments on commit c5f60ae

Please sign in to comment.