Fix uninitialized array and module in Cli\Command
This commit is contained in:
parent
b3e0b5d587
commit
ae469311be
|
@ -56,6 +56,7 @@ abstract class Command
|
||||||
$this->trace = $this->params->shift('trace', false);
|
$this->trace = $this->params->shift('trace', false);
|
||||||
$this->isVerbose = $this->params->shift('verbose', false);
|
$this->isVerbose = $this->params->shift('verbose', false);
|
||||||
$this->isDebugging = $this->params->shift('debug', false);
|
$this->isDebugging = $this->params->shift('debug', false);
|
||||||
|
$this->configs = [];
|
||||||
if ($initialize) {
|
if ($initialize) {
|
||||||
$this->init();
|
$this->init();
|
||||||
}
|
}
|
||||||
|
@ -94,7 +95,7 @@ abstract class Command
|
||||||
return $this->config;
|
return $this->config;
|
||||||
} else {
|
} else {
|
||||||
if (! array_key_exists($file, $this->configs)) {
|
if (! array_key_exists($file, $this->configs)) {
|
||||||
$this->configs[$file] = Config::module($module, $file);
|
$this->configs[$file] = Config::module($this->moduleName, $file);
|
||||||
}
|
}
|
||||||
return $this->configs[$file];
|
return $this->configs[$file];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue