Merge pull request #12 from jenolan/master

Commit 7b2a2c4a88 changed the constant pro...
This commit is contained in:
Smarty PHP Template Engine
2014-12-11 03:11:19 +01:00

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"); $compiler->trigger_template_error("(secure mode) constants not permitted");
break; break;
} }
if( strpos( $_index[1], '$') === false ){
return "@constant({$_index[1]})"; return "@constant('{$_index[1]}')";
} else {
return "@constant({$_index[1]})";
}
case 'config': case 'config':
if (isset($_index[2])) { if (isset($_index[2])) {