From 315e0400ffce2c07fe8804daa7623b092601bc78 Mon Sep 17 00:00:00 2001 From: slawkens1 Date: Wed, 11 Oct 2017 23:19:11 +0200 Subject: [PATCH] * fixed config loaded when some inline comments are present --- system/functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/functions.php b/system/functions.php index 76ccf999..c0d1363b 100644 --- a/system/functions.php +++ b/system/functions.php @@ -1173,6 +1173,10 @@ function load_config_lua($filename) if(substr($key, 0, 2) != '--') { $value = trim($tmp_exp[1]); + if(strpos($value, '--') !== false) {// found some deep comment + $value = preg_replace('/--.*$/i', '', $value); + } + if(is_numeric($value)) $result[$key] = (float) $value; elseif(in_array(substr($value, 0 , 1), array("'", '"')) && in_array(substr($value, -1 , 1), array("'", '"')))