Skip to content

Commit

Permalink
Fixed config loading with comments
Browse files Browse the repository at this point in the history
  • Loading branch information
slawkens committed May 3, 2017
1 parent 82b60f7 commit f35a24b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit f35a24b

Please sign in to comment.