From 862ce9db089f97b2bf5d4c2bfd99e3c5cb14bcca Mon Sep 17 00:00:00 2001 From: uwetews Date: Tue, 15 Dec 2015 01:34:18 +0100 Subject: [PATCH] - bugfix {$smarty.cookies.foo} did return the $_COOKIE array not the 'foo' value https://github.com/smarty-php/smarty/issues/122 --- change_log.txt | 3 +++ libs/Smarty.class.php | 2 +- .../smarty_internal_compile_private_special_variable.php | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index 142cf146..bd9474b0 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@  ===== 3.1.29-dev ===== (xx.xx.2015) + 15.12.2015 + - bugfix {$smarty.cookies.foo} did return the $_COOKIE array not the 'foo' value https://github.com/smarty-php/smarty/issues/122 + 14.12.2015 - bugfix {$smarty.config.foo} broken in 3.1.28 https://github.com/smarty-php/smarty/issues/120 - bugfix multiple calls of {section} with same name droped E_NOTICE error https://github.com/smarty-php/smarty/issues/118 diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 12f3bb64..0e275c80 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -118,7 +118,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.29-dev/3'; + const SMARTY_VERSION = '3.1.29-dev/4'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_compile_private_special_variable.php b/libs/sysplugins/smarty_internal_compile_private_special_variable.php index a8662e13..e3cd2877 100644 --- a/libs/sysplugins/smarty_internal_compile_private_special_variable.php +++ b/libs/sysplugins/smarty_internal_compile_private_special_variable.php @@ -54,7 +54,8 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C $compiler->trigger_template_error("(secure mode) super globals not permitted"); break; } - return '$_COOKIE'; + $compiled_ref = '$_COOKIE'; + break; case 'get': case 'post': case 'env':