From 8eabafed83777ed00ffb5d639f28d0a668678e37 Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Wed, 29 Jul 2015 23:30:52 +0200 Subject: [PATCH] add some error suppression for undefined variables --- libs/sysplugins/smarty_internal_compile_section.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/sysplugins/smarty_internal_compile_section.php b/libs/sysplugins/smarty_internal_compile_section.php index fd4284b3..3675b0c1 100644 --- a/libs/sysplugins/smarty_internal_compile_section.php +++ b/libs/sysplugins/smarty_internal_compile_section.php @@ -151,7 +151,7 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_CompileBase $v = (int) $attr_value; $t = 0; } else { - $v = "(is_array(\$_loop=$attr_value) ? count(\$_loop) : max(0, (int) \$_loop))"; + $v = "(is_array(@\$_loop=$attr_value) ? count(\$_loop) : max(0, (int) \$_loop))"; $t = 1; } if (isset($smartyAttr['isSmarty']['loop'])) { @@ -180,7 +180,7 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_CompileBase $t = 0; break; } - $smartyAttr['initLocal']['step'] = "((int)$attr_value) == 0 ? 1 : (int)$attr_value"; + $smartyAttr['initLocal']['step'] = "((int)@$attr_value) == 0 ? 1 : (int)@$attr_value"; $v = "{$local}step"; $t = 2; break; @@ -192,7 +192,7 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_CompileBase $t = 0; break; } - $v = "(int) $attr_value"; + $v = "(int)@$attr_value"; $t = 3; break; }