Skip to content

Commit 912a409

Browse files
authored
[9.x] Fixes regression from #44662 (#44826)
Calling `php artisan --version` now going to failed. Signed-off-by: Mior Muhammad Zaki <[email protected]> Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent 9040418 commit 912a409

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Illuminate/Console/Application.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,12 @@ public function run(InputInterface $input = null, OutputInterface $output = null
9494
$input = $input ?: new ArgvInput
9595
);
9696

97-
try {
98-
$input->bind($this->find($commandName)->getDefinition());
99-
} catch (ExceptionInterface) {
100-
// ...
97+
if (! is_null($commandName)) {
98+
try {
99+
$input->bind($this->find($commandName)->getDefinition());
100+
} catch (ExceptionInterface) {
101+
// ...
102+
}
101103
}
102104

103105
$this->events->dispatch(

0 commit comments

Comments
 (0)