mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
- bugfix named {foreach} comparison like $smarty.foreach.foobar.index > 1 did compile into wrong code https://github.com/smarty-php/smarty/issues/41
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
===== 3.1.24.dev ===== (xx.xx.2015)
|
===== 3.1.24.dev ===== (xx.xx.2015)
|
||||||
21.05.2015
|
21.05.2015
|
||||||
- bugfix broken PHP 5.2 compatibility when compiling <?php tags https://github.com/smarty-php/smarty/issues/40
|
- bugfix broken PHP 5.2 compatibility when compiling <?php tags https://github.com/smarty-php/smarty/issues/40
|
||||||
|
- bugfix named {foreach} comparison like $smarty.foreach.foobar.index > 1 did compile into wrong code https://github.com/smarty-php/smarty/issues/41
|
||||||
|
|
||||||
19.05.2015
|
19.05.2015
|
||||||
- bugfix compiler did overwrite existing variable value when setting the nocache attribute https://github.com/smarty-php/smarty/issues/39
|
- bugfix compiler did overwrite existing variable value when setting the nocache attribute https://github.com/smarty-php/smarty/issues/39
|
||||||
|
@@ -111,7 +111,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
/**
|
/**
|
||||||
* smarty version
|
* smarty version
|
||||||
*/
|
*/
|
||||||
const SMARTY_VERSION = '3.1.24-dev/8';
|
const SMARTY_VERSION = '3.1.24-dev/9';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* define variable scopes
|
* define variable scopes
|
||||||
|
@@ -35,7 +35,7 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
|
|||||||
case 'foreach':
|
case 'foreach':
|
||||||
$name = trim($_index[1], "'");
|
$name = trim($_index[1], "'");
|
||||||
$foreachVar = "'__foreach_{$name}'";
|
$foreachVar = "'__foreach_{$name}'";
|
||||||
return "isset(\$_smarty_tpl->tpl_vars[$foreachVar]->value[{$_index[2]}]) ? \$_smarty_tpl->tpl_vars[$foreachVar]->value[{$_index[2]}] : null";
|
return "(isset(\$_smarty_tpl->tpl_vars[$foreachVar]->value[{$_index[2]}]) ? \$_smarty_tpl->tpl_vars[$foreachVar]->value[{$_index[2]}] : null)";
|
||||||
case 'section':
|
case 'section':
|
||||||
return "\$_smarty_tpl->getVariable('smarty')->value$parameter";
|
return "\$_smarty_tpl->getVariable('smarty')->value$parameter";
|
||||||
case 'capture':
|
case 'capture':
|
||||||
|
Reference in New Issue
Block a user