Allow running without a config file.

This commit is contained in:
flash 2018-09-16 21:12:58 +02:00
parent 18600c4869
commit b4a4c75904

View file

@ -78,7 +78,7 @@ final class Application
self::$instance = $this; self::$instance = $this;
$this->startupTime = microtime(true); $this->startupTime = microtime(true);
$this->debugMode = $debug; $this->debugMode = $debug;
$this->config = parse_ini_file($configFile, true, INI_SCANNER_TYPED); $this->config = is_file($configFile) ? parse_ini_file($configFile, true, INI_SCANNER_TYPED) : [];
if ($this->config === false) { if ($this->config === false) {
throw new UnexpectedValueException('Failed to parse configuration.'); throw new UnexpectedValueException('Failed to parse configuration.');