mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +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':
|
case 'const':
|
||||||
array_shift($indexes);
|
array_shift($indexes);
|
||||||
$_val = $this->_parse_var_props(substr($indexes[0],1));
|
$_val = $this->_parse_var_props(substr($indexes[0],1));
|
||||||
$compiled_ref = '(defined(' . $_val . ') ? ' . $this->_dequote($_val) . ' : null)';
|
$compiled_ref = '@constant(' . $_val . ')';
|
||||||
$_max_index = 1;
|
$_max_index = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user