mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Fixed config loading with comments
This commit is contained in:
parent
82b60f78da
commit
f35a24b35b
@ -1206,7 +1206,7 @@ function load_config_lua($filename)
|
|||||||
// TODO: new parser that will also load dofile() includes
|
// TODO: new parser that will also load dofile() includes
|
||||||
|
|
||||||
// strip lua comments to prevent parsing errors
|
// strip lua comments to prevent parsing errors
|
||||||
fwrite($file, preg_replace('/(-)(-) (.*)/', '', file_get_contents($config_file)));
|
fwrite($file, preg_replace('/(-)(-)(.*)/', '', file_get_contents($config_file)));
|
||||||
fclose($file);
|
fclose($file);
|
||||||
|
|
||||||
$result = array_merge(parse_ini_file($tempFile, true), isset($config['lua']) ? $config['lua'] : array());
|
$result = array_merge(parse_ini_file($tempFile, true), isset($config['lua']) ? $config['lua'] : array());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user