Skip to content

Commit c553213

Browse files
committed
bug fixed for run command
1 parent 0ea6058 commit c553213

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/App.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function runCommand($name, $believable = false)
9797
if ( is_object($handler) && ($handler instanceof \Closure) ) {
9898
$status = $handler($this->input, $this->output);
9999
} else {
100-
if ( !class_exists($handler, false) ) {
100+
if ( !class_exists($handler) ) {
101101
throw new \InvalidArgumentException("The console command class [$handler] not exists!");
102102
}
103103

@@ -131,6 +131,10 @@ public function runAction($name, $action, $believable = false)
131131
// Controller class
132132
$controller = $this->controllers[$name];
133133

134+
if ( !class_exists($controller) ) {
135+
throw new \InvalidArgumentException("The console controller class [$controller] not exists!");
136+
}
137+
134138
/** @var Controller $object */
135139
$object = new $controller($this->input, $this->output);
136140
$object->setName($name);

0 commit comments

Comments
 (0)