diff --git a/src/Flex.php b/src/Flex.php index 6c53270a..f6481d34 100644 --- a/src/Flex.php +++ b/src/Flex.php @@ -162,6 +162,7 @@ class_exists(__NAMESPACE__.str_replace('/', '\\', substr($file, \strlen(__DIR__) $resolver = new PackageResolver($this->downloader); + $command = null; $commandObj = null; try { $command = $input->getFirstArgument(); @@ -180,7 +181,7 @@ class_exists(__NAMESPACE__.str_replace('/', '\\', substr($file, \strlen(__DIR__) $symfonyRequire = null; } - if (isset(self::$aliasResolveCommands[$command])) { + if (null !== $command && isset(self::$aliasResolveCommands[$command])) { // When the command name is abbreviated (e.g. "req" for "require"), Composer // activates plugins early to look up potential script commands, before the // input has been bound to the command definition. In that case "packages"