mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
* fixed config loaded when some inline comments are present
This commit is contained in:
parent
22cf7f5d4f
commit
315e0400ff
@ -1173,6 +1173,10 @@ function load_config_lua($filename)
|
|||||||
if(substr($key, 0, 2) != '--')
|
if(substr($key, 0, 2) != '--')
|
||||||
{
|
{
|
||||||
$value = trim($tmp_exp[1]);
|
$value = trim($tmp_exp[1]);
|
||||||
|
if(strpos($value, '--') !== false) {// found some deep comment
|
||||||
|
$value = preg_replace('/--.*$/i', '', $value);
|
||||||
|
}
|
||||||
|
|
||||||
if(is_numeric($value))
|
if(is_numeric($value))
|
||||||
$result[$key] = (float) $value;
|
$result[$key] = (float) $value;
|
||||||
elseif(in_array(substr($value, 0 , 1), array("'", '"')) && in_array(substr($value, -1 , 1), array("'", '"')))
|
elseif(in_array(substr($value, 0 , 1), array("'", '"')) && in_array(substr($value, -1 , 1), array("'", '"')))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user