Fixed config loading with comments

This commit is contained in:
slawkens1 2017-05-04 00:18:38 +02:00
parent 82b60f78da
commit f35a24b35b

View File

@ -1206,7 +1206,7 @@ function load_config_lua($filename)
// TODO: new parser that will also load dofile() includes
// 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);
$result = array_merge(parse_ini_file($tempFile, true), isset($config['lua']) ? $config['lua'] : array());