From 811e2e0e13147162bfe76687fb8644b03dd51fe3 Mon Sep 17 00:00:00 2001 From: Stricted Date: Tue, 12 May 2015 15:43:57 +0200 Subject: [PATCH] fix constant handling on undefined constants you get 'TEST_CONST' on definied constants TEST_CONST --- .../smarty_internal_compile_private_special_variable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/sysplugins/smarty_internal_compile_private_special_variable.php b/libs/sysplugins/smarty_internal_compile_private_special_variable.php index 0a98127e..a7f37203 100644 --- a/libs/sysplugins/smarty_internal_compile_private_special_variable.php +++ b/libs/sysplugins/smarty_internal_compile_private_special_variable.php @@ -82,7 +82,7 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C $compiler->trigger_template_error("(secure mode) constants not permitted"); break; } - if (strpos($_index[1], '$') === false) { + if (strpos($_index[1], '$') === false && strpos($_index[1], '\'')) { return "@constant('{$_index[1]}')"; } else { return "@constant({$_index[1]})";