1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-08-07 17:42:53 +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:
David Goodwin
2019-09-25 13:55:07 +01:00
parent 7360407b73
commit 907bd7ee46
199 changed files with 5335 additions and 4857 deletions

View File

@@ -65,8 +65,8 @@ abstract class Smarty_Internal_CompileBase
* the corresponding list. The keyword '_any' specifies that any attribute will be accepted
* as valid
*
* @param object $compiler compiler object
* @param array $attributes attributes applied to the tag
* @param object $compiler compiler object
* @param array $attributes attributes applied to the tag
*
* @return array of mapped attributes for further processing
*/
@@ -103,8 +103,12 @@ abstract class Smarty_Internal_CompileBase
if (isset($this->optionMap[ $v ])) {
$_indexed_attr[ $k ] = $this->optionMap[ $v ];
} else {
$compiler->trigger_template_error("illegal value '" . var_export($v, true) .
"' for option flag '{$k}'", null, true);
$compiler->trigger_template_error(
"illegal value '" . var_export($v, true) .
"' for option flag '{$k}'",
null,
true
);
}
}
// must be named attribute
@@ -124,8 +128,14 @@ abstract class Smarty_Internal_CompileBase
if ($this->optional_attributes !== array('_any')) {
if (!isset($this->mapCache[ 'all' ])) {
$this->mapCache[ 'all' ] =
array_fill_keys(array_merge($this->required_attributes, $this->optional_attributes,
$this->option_flags), true);
array_fill_keys(
array_merge(
$this->required_attributes,
$this->optional_attributes,
$this->option_flags
),
true
);
}
foreach ($_indexed_attr as $key => $dummy) {
if (!isset($this->mapCache[ 'all' ][ $key ]) && $key !== 0) {
@@ -162,8 +172,8 @@ abstract class Smarty_Internal_CompileBase
* Pop closing tag
* Raise an error if this stack-top doesn't match with expected opening tags
*
* @param object $compiler compiler object
* @param array|string $expectedTag the expected opening tag names
* @param object $compiler compiler object
* @param array|string $expectedTag the expected opening tag names
*
* @return mixed any type the opening tag's name or saved data
*/
@@ -173,7 +183,7 @@ abstract class Smarty_Internal_CompileBase
// get stacked info
list($_openTag, $_data) = array_pop($compiler->_tag_stack);
// open tag must match with the expected ones
if (in_array($_openTag, (array) $expectedTag)) {
if (in_array($_openTag, (array)$expectedTag)) {
if (is_null($_data)) {
// return opening tag
return $_openTag;
@@ -184,12 +194,10 @@ abstract class Smarty_Internal_CompileBase
}
// wrong nesting of tags
$compiler->trigger_template_error("unclosed '{$compiler->smarty->left_delimiter}{$_openTag}{$compiler->smarty->right_delimiter}' tag");
return;
}
// wrong nesting of tags
$compiler->trigger_template_error('unexpected closing tag', null, true);
return;
}
}