From e3f2abc06e32824df1b58e2d82da5acbdc5445e7 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sat, 13 Feb 2021 22:56:53 +0100 Subject: [PATCH] Fix parsing empty strings in config.lua (with comments) (cherry picked from commit eed490507c83518812451e0ba50b23d5a2914ab0) --- system/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/functions.php b/system/functions.php index 845e4cdc..fee72b27 100644 --- a/system/functions.php +++ b/system/functions.php @@ -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 $value = str_replace($tmp_key, $tmp_value, $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 ' . ($ln + 1) . ' of LUA config file is not valid [key: ' . $key . ']'); }