diff --git a/.travis.yml b/.travis.yml index aa01db7..d5980d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: php +sudo: false php: - 5.4 diff --git a/Config/AbstractConfig.php b/Config/AbstractConfig.php index 6bb29ce..550ddac 100644 --- a/Config/AbstractConfig.php +++ b/Config/AbstractConfig.php @@ -113,10 +113,14 @@ public function setConfig($file) */ private function readFile($file) { - if ($this->filecheck && !is_file($file)) { - throw new \InvalidArgumentException( - 'Config::Abstract() - Given config file ' . $file . ' does not exist!' - ); + if ($this->filecheck) { + if (is_file($file)) { + $file = file_get_contents($file); + } else { + throw new \InvalidArgumentException( + 'Config::Abstract() - Given config file ' . $file . ' does not exist!' + ); + } } return (array)Yaml::parse($file);