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:
Larry Lewis
2014-12-11 08:06:27 +11:00
parent 2a2a73cabc
commit 7bb7b3ac03

View File

@@ -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])) {