From fa10e0945ecd45bfe78a2c8fb015a43092b4944b Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 10 Dec 2015 14:02:22 +0100 Subject: bug #385 update to smarty-3.1.28-dev (from Github) --- .../sysplugins/smarty_internal_compile_break.php | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'include/smarty/libs/sysplugins/smarty_internal_compile_break.php') diff --git a/include/smarty/libs/sysplugins/smarty_internal_compile_break.php b/include/smarty/libs/sysplugins/smarty_internal_compile_break.php index b25bef6c4..cbc73d36a 100644 --- a/include/smarty/libs/sysplugins/smarty_internal_compile_break.php +++ b/include/smarty/libs/sysplugins/smarty_internal_compile_break.php @@ -1,21 +1,21 @@ true, 'foreach' => true, 'while' => true, 'section' => true); // check and get attributes $_attr = $this->getAttributes($compiler, $args); if ($_attr['nocache'] === true) { - $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno); + $compiler->trigger_template_error('nocache option not allowed', null, true); } if (isset($_attr['levels'])) { if (!is_numeric($_attr['levels'])) { - $compiler->trigger_template_error('level attribute must be a numeric constant', $compiler->lex->taglineno); + $compiler->trigger_template_error('level attribute must be a numeric constant', null, true); } $_levels = $_attr['levels']; } else { @@ -61,17 +64,14 @@ class Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase { $stack_count = count($compiler->_tag_stack) - 1; while ($level_count > 0 && $stack_count >= 0) { if (isset($_is_loopy[$compiler->_tag_stack[$stack_count][0]])) { - $level_count--; + $level_count --; } - $stack_count--; + $stack_count --; } if ($level_count != 0) { - $compiler->trigger_template_error("cannot break {$_levels} level(s)", $compiler->lex->taglineno); + $compiler->trigger_template_error("cannot break {$_levels} level(s)", null, true); } - $compiler->has_code = true; - return ""; - } + return ""; + } } - -?> \ No newline at end of file -- cgit v1.2.3