Merge pull request #30 from Stricted/master

fix constant handling
This commit is contained in:
uwetews
2015-05-12 18:40:08 +02:00

View File

@@ -82,7 +82,7 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
$compiler->trigger_template_error("(secure mode) constants not permitted");
break;
}
if (strpos($_index[1], '$') === false) {
if (strpos($_index[1], '$') === false && strpos($_index[1], '\'') === false ) {
return "@constant('{$_index[1]}')";
} else {
return "@constant({$_index[1]})";