mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Fix parsing empty strings in config.lua (with comments)
(cherry picked from commit eed490507c83518812451e0ba50b23d5a2914ab0)
This commit is contained in:
parent
3d73de13d8
commit
e3f2abc06e
@ -968,7 +968,7 @@ function load_config_lua($filename)
|
|||||||
foreach($result as $tmp_key => $tmp_value) // load values definied by other keys, like: dailyFragsToBlackSkull = dailyFragsToRedSkull
|
foreach($result as $tmp_key => $tmp_value) // load values definied by other keys, like: dailyFragsToBlackSkull = dailyFragsToRedSkull
|
||||||
$value = str_replace($tmp_key, $tmp_value, $value);
|
$value = str_replace($tmp_key, $tmp_value, $value);
|
||||||
$ret = @eval("return $value;");
|
$ret = @eval("return $value;");
|
||||||
if((string) $ret == '') // = parser error
|
if((string) $ret == '' && trim($value) !== '""') // = parser error
|
||||||
{
|
{
|
||||||
throw new RuntimeException('ERROR: Loading config.lua file. Line <b>' . ($ln + 1) . '</b> of LUA config file is not valid [key: <b>' . $key . '</b>]');
|
throw new RuntimeException('ERROR: Loading config.lua file. Line <b>' . ($ln + 1) . '</b> of LUA config file is not valid [key: <b>' . $key . '</b>]');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user