Loader: Fix Variable '$obj' is probably undefined

This commit is contained in:
Sukhwinder Dhillon 2023-08-16 13:22:39 +02:00 committed by raviks789
parent 17c2a19e28
commit fd984c5798

View File

@ -251,6 +251,7 @@ class Loader
return false;
}
$obj = null;
try {
if ($this->moduleName) {
$this->app->getModuleManager()->loadModule($this->moduleName);
@ -267,7 +268,7 @@ class Loader
$obj->init();
return $obj->{$this->actionName . 'Action'}();
} catch (Exception $e) {
if ($obj && $obj instanceof Command && $obj->showTrace()) {
if ($obj instanceof Command && $obj->showTrace()) {
fwrite(STDERR, $this->formatTrace($e->getTrace()));
}