From bfb99370d78782e2575eb43d6eacdf7fcd82c3ed Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sat, 31 Oct 2015 15:57:36 +0100 Subject: [PATCH] Undefined array --- classes/Config.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/classes/Config.php b/classes/Config.php index 8625585..c0c5325 100644 --- a/classes/Config.php +++ b/classes/Config.php @@ -39,9 +39,11 @@ Class Config private function __construct() { $yaml = Yaml::parse(__DIR__.'/../config.yml'); - foreach ($yaml as $param=>$value) { - if (isset($this->$param)) { - $this->$param = $value; + if (isset($yaml) && is_array($yaml)) { + foreach ($yaml as $param=>$value) { + if (isset($this->$param)) { + $this->$param = $value; + } } } if (getenv('CONVERT')) {