mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
simplify smarty.const.foo and smarty.const.$foo logic
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user