Undefined array
This commit is contained in:
parent
7da7fcbbe4
commit
bfb99370d7
1 changed files with 5 additions and 3 deletions
|
@ -39,11 +39,13 @@ Class Config
|
||||||
private function __construct()
|
private function __construct()
|
||||||
{
|
{
|
||||||
$yaml = Yaml::parse(__DIR__.'/../config.yml');
|
$yaml = Yaml::parse(__DIR__.'/../config.yml');
|
||||||
|
if (isset($yaml) && is_array($yaml)) {
|
||||||
foreach ($yaml as $param=>$value) {
|
foreach ($yaml as $param=>$value) {
|
||||||
if (isset($this->$param)) {
|
if (isset($this->$param)) {
|
||||||
$this->$param = $value;
|
$this->$param = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (getenv('CONVERT')) {
|
if (getenv('CONVERT')) {
|
||||||
$this->convert = getenv('CONVERT');
|
$this->convert = getenv('CONVERT');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue