From eed490507c83518812451e0ba50b23d5a2914ab0 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) --- system/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/functions.php b/system/functions.php index 65a777c9..dec1233d 100644 --- a/system/functions.php +++ b/system/functions.php @@ -973,7 +973,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 . ']'); }