Skip to content

Commit

Permalink
Config::fromIni(): use IniParser::parseIniFile() instead of parse_ini…
Browse files Browse the repository at this point in the history
…_file()

refs #10150
  • Loading branch information
Al2Klimov committed Sep 22, 2015
1 parent acb93ce commit 626c349
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/Icinga/Application/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Icinga\Data\Selectable;
use Icinga\Data\SimpleQuery;
use Icinga\File\Ini\IniWriter;
use Icinga\File\Ini\IniParser;
use Icinga\Exception\NotReadableError;

/**
Expand Down Expand Up @@ -313,7 +314,7 @@ public static function fromIni($file)
if ($filepath === false) {
$emptyConfig->setConfigFile($file);
} elseif (is_readable($filepath)) {
$config = new static(new ConfigObject(parse_ini_file($filepath, true)));
$config = static::fromArray(IniParser::parseIniFile($filepath)->toArray());
$config->setConfigFile($filepath);
return $config;
} elseif (@file_exists($filepath)) {
Expand Down

0 comments on commit 626c349

Please sign in to comment.