From 63b1a2b04dffe909b96e9b73b2ce81ca08fa2826 Mon Sep 17 00:00:00 2001 From: mohrt Date: Fri, 28 Feb 2003 16:36:19 +0000 Subject: [PATCH] simplify smarty.const.foo and smarty.const.$foo logic --- libs/Smarty_Compiler.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 3e731eb5..d0dcb81f 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -1746,7 +1746,7 @@ class Smarty_Compiler extends Smarty { case 'const': array_shift($indexes); $_val = $this->_parse_var_props(substr($indexes[0],1)); - $compiled_ref = '(defined(' . $_val . ') ? ' . $this->_dequote($_val) . ' : null)'; + $compiled_ref = '@constant(' . $_val . ')'; $_max_index = 1; break;