diff --git a/src/Application.php b/src/Application.php index 93659b1d6..2f07a71ad 100644 --- a/src/Application.php +++ b/src/Application.php @@ -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];