mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
Fix generated code
This commit is contained in:
@@ -28,7 +28,6 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
|
|||||||
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
|
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
|
||||||
{
|
{
|
||||||
$_index = preg_split("/\]\[/", substr($parameter, 1, strlen($parameter) - 2));
|
$_index = preg_split("/\]\[/", substr($parameter, 1, strlen($parameter) - 2));
|
||||||
$compiled_ref = ' ';
|
|
||||||
$variable = strtolower($compiler->getId($_index[0]));
|
$variable = strtolower($compiler->getId($_index[0]));
|
||||||
if ($variable === false) {
|
if ($variable === false) {
|
||||||
$compiler->trigger_template_error("special \$Smarty variable name index can not be variable", $compiler->lex->taglineno);
|
$compiler->trigger_template_error("special \$Smarty variable name index can not be variable", $compiler->lex->taglineno);
|
||||||
@@ -54,9 +53,7 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
|
|||||||
$compiler->trigger_template_error("(secure mode) super globals not permitted");
|
$compiler->trigger_template_error("(secure mode) super globals not permitted");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$compiled_ref = '$_COOKIE';
|
return '$_COOKIE';
|
||||||
break;
|
|
||||||
|
|
||||||
case 'get':
|
case 'get':
|
||||||
case 'post':
|
case 'post':
|
||||||
case 'env':
|
case 'env':
|
||||||
@@ -69,7 +66,7 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
|
|||||||
$compiler->trigger_template_error("(secure mode) super globals not permitted");
|
$compiler->trigger_template_error("(secure mode) super globals not permitted");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$compiled_ref = '$_' . strtoupper($variable);
|
return '$_' . strtoupper($variable);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'template':
|
case 'template':
|
||||||
|
Reference in New Issue
Block a user