mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 14:54:24 +02:00
Loader: Fix Variable '$obj' is probably undefined
This commit is contained in:
parent
17c2a19e28
commit
fd984c5798
@ -251,6 +251,7 @@ class Loader
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$obj = null;
|
||||||
try {
|
try {
|
||||||
if ($this->moduleName) {
|
if ($this->moduleName) {
|
||||||
$this->app->getModuleManager()->loadModule($this->moduleName);
|
$this->app->getModuleManager()->loadModule($this->moduleName);
|
||||||
@ -267,7 +268,7 @@ class Loader
|
|||||||
$obj->init();
|
$obj->init();
|
||||||
return $obj->{$this->actionName . 'Action'}();
|
return $obj->{$this->actionName . 'Action'}();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
if ($obj && $obj instanceof Command && $obj->showTrace()) {
|
if ($obj instanceof Command && $obj->showTrace()) {
|
||||||
fwrite(STDERR, $this->formatTrace($e->getTrace()));
|
fwrite(STDERR, $this->formatTrace($e->getTrace()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user