mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
Commit 7b2a2c4a88
changed the constant processing to allow a variable in teh $smarty.const but this broke the normal callout. Change allows both methods.
This commit is contained in:
@@ -79,8 +79,11 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
|
||||
$compiler->trigger_template_error("(secure mode) constants not permitted");
|
||||
break;
|
||||
}
|
||||
|
||||
return "@constant({$_index[1]})";
|
||||
if( strpos( $_index[1], '$') === false ){
|
||||
return "@constant('{$_index[1]}')";
|
||||
} else {
|
||||
return "@constant({$_index[1]})";
|
||||
}
|
||||
|
||||
case 'config':
|
||||
if (isset($_index[2])) {
|
||||
|
Reference in New Issue
Block a user