Compare commits

...

1 Commits

Author SHA1 Message Date
slawkens1
f35a24b35b Fixed config loading with comments 2017-05-04 00:18:38 +02:00

View File

@@ -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());