Skip to content

Commit

Permalink
Merge pull request #201 from Codaxis/parse-ini-fallback
Browse files Browse the repository at this point in the history
Fallback for disabled parse_ini_file
  • Loading branch information
markstory committed Apr 1, 2014
2 parents bc67bba + 2f1975a commit 1699999
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Lib/AssetConfig.php
Expand Up @@ -148,8 +148,12 @@ protected static function _readConfig($filename) {
if (empty($filename) || !is_string($filename) || !file_exists($filename)) {
throw new RuntimeException(sprintf('Configuration file "%s" was not found.', $filename));
}

return parse_ini_file($filename, true);

if (function_exists('parse_ini_file')) {
return parse_ini_file($filename, true);
} else {
return parse_ini_string(file_get_contents($filename), true);
}
}

/**
Expand Down

0 comments on commit 1699999

Please sign in to comment.