diff --git a/src/Config/Config.php b/src/Config/Config.php index d984605..5013361 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -20,6 +20,10 @@ public function __construct($config) { parent::__construct($config); + if (!isset($config['redirects']) || ! is_array($config['redirects'])) { + $config['redirects'] = []; + } + $this->remove('redirects'); foreach ($config['redirects'] as $name => $parameters) { if (!is_array($parameters)) { @@ -29,6 +33,10 @@ public function __construct($config) } } + if (!isset($config['jits']) || ! is_array($config['jits'])) { + $config['jits'] = []; + } + $this->remove('jits'); foreach ($config['jits'] as $name => $parameters) { if (!is_array($parameters)) { @@ -86,4 +94,13 @@ public function setVariables(array $variables) { $this->set('variables', $variables); } + + /** + * Get slightly tweaked so the default response is an array + * {@inheritdoc} + */ + public function get($key, $default = null, $deep = false) + { + return parent::get($key, $default = [], $deep); + } }