You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-08-09 05:02:44 +03:00
update Smarty to v3.1.33 - "This release does cover security issue CVE-2018-16831, other bug fixes (see changelog.txt) and adds a new feature of the {capture} tag (see NEW_FEATURES.txt)."
This commit is contained in:
@@ -33,16 +33,16 @@ class Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase
|
||||
public $shorttag_order = array('levels');
|
||||
|
||||
/**
|
||||
* Tag name may be overloaded by Smarty_Internal_Compile_Continue
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
* Tag name may be overloaded by Smarty_Internal_Compile_Continue
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $tag = 'break';
|
||||
|
||||
/**
|
||||
* Compiles code for the {break} tag
|
||||
*
|
||||
* @param array $args array with attributes from parser
|
||||
* @param array $args array with attributes from parser
|
||||
* @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
|
||||
*
|
||||
* @return string compiled code
|
||||
@@ -67,7 +67,7 @@ class Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase
|
||||
/**
|
||||
* check attributes and return array of break and foreach levels
|
||||
*
|
||||
* @param array $args array with attributes from parser
|
||||
* @param array $args array with attributes from parser
|
||||
* @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
|
||||
*
|
||||
* @return array
|
||||
@@ -78,11 +78,9 @@ class Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase
|
||||
static $_is_loopy = array('for' => 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', null, true);
|
||||
}
|
||||
|
||||
if (isset($_attr[ 'levels' ])) {
|
||||
if (!is_numeric($_attr[ 'levels' ])) {
|
||||
$compiler->trigger_template_error('level attribute must be a numeric constant', null, true);
|
||||
@@ -101,18 +99,18 @@ class Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase
|
||||
if ($level_count === 0) {
|
||||
break;
|
||||
}
|
||||
$level_count --;
|
||||
$level_count--;
|
||||
if ($compiler->_tag_stack[ $stack_count ][ 0 ] === 'foreach') {
|
||||
$foreachLevels ++;
|
||||
$foreachLevels++;
|
||||
}
|
||||
}
|
||||
$stack_count --;
|
||||
$stack_count--;
|
||||
}
|
||||
if ($level_count !== 0) {
|
||||
$compiler->trigger_template_error("cannot {$this->tag} {$levels} level(s)", null, true);
|
||||
}
|
||||
if ($lastTag === 'foreach' && $this->tag === 'break' && $foreachLevels > 0) {
|
||||
$foreachLevels --;
|
||||
$foreachLevels--;
|
||||
}
|
||||
return array($levels, $foreachLevels);
|
||||
}
|
||||
|
Reference in New Issue
Block a user