You've already forked postfixadmin
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:
@@ -25,15 +25,18 @@ class Smarty_Internal_Method_GetTemplateVars
|
||||
* @link http://www.smarty.net/docs/en/api.get.template.vars.tpl
|
||||
*
|
||||
* @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $data
|
||||
* @param string $varName variable name or null
|
||||
* @param string $varName variable name or null
|
||||
* @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $_ptr optional pointer to data object
|
||||
* @param bool $searchParents include parent templates?
|
||||
* @param bool $searchParents include parent templates?
|
||||
*
|
||||
* @return mixed variable value or or array of variables
|
||||
*/
|
||||
public function getTemplateVars(Smarty_Internal_Data $data, $varName = null, Smarty_Internal_Data $_ptr = null,
|
||||
$searchParents = true)
|
||||
{
|
||||
public function getTemplateVars(
|
||||
Smarty_Internal_Data $data,
|
||||
$varName = null,
|
||||
Smarty_Internal_Data $_ptr = null,
|
||||
$searchParents = true
|
||||
) {
|
||||
if (isset($varName)) {
|
||||
$_var = $this->_getVariable($data, $varName, $_ptr, $searchParents, false);
|
||||
if (is_object($_var)) {
|
||||
@@ -47,7 +50,7 @@ class Smarty_Internal_Method_GetTemplateVars
|
||||
$_ptr = $data;
|
||||
}
|
||||
while ($_ptr !== null) {
|
||||
foreach ($_ptr->tpl_vars AS $key => $var) {
|
||||
foreach ($_ptr->tpl_vars as $key => $var) {
|
||||
if (!array_key_exists($key, $_result)) {
|
||||
$_result[ $key ] = $var->value;
|
||||
}
|
||||
@@ -60,7 +63,7 @@ class Smarty_Internal_Method_GetTemplateVars
|
||||
}
|
||||
}
|
||||
if ($searchParents && isset(Smarty::$global_tpl_vars)) {
|
||||
foreach (Smarty::$global_tpl_vars AS $key => $var) {
|
||||
foreach (Smarty::$global_tpl_vars as $key => $var) {
|
||||
if (!array_key_exists($key, $_result)) {
|
||||
$_result[ $key ] = $var->value;
|
||||
}
|
||||
@@ -81,9 +84,13 @@ class Smarty_Internal_Method_GetTemplateVars
|
||||
*
|
||||
* @return \Smarty_Variable
|
||||
*/
|
||||
public function _getVariable(Smarty_Internal_Data $data, $varName, Smarty_Internal_Data $_ptr = null,
|
||||
$searchParents = true, $errorEnable = true)
|
||||
{
|
||||
public function _getVariable(
|
||||
Smarty_Internal_Data $data,
|
||||
$varName,
|
||||
Smarty_Internal_Data $_ptr = null,
|
||||
$searchParents = true,
|
||||
$errorEnable = true
|
||||
) {
|
||||
if ($_ptr === null) {
|
||||
$_ptr = $data;
|
||||
}
|
||||
@@ -107,7 +114,6 @@ class Smarty_Internal_Method_GetTemplateVars
|
||||
// force a notice
|
||||
$x = $$varName;
|
||||
}
|
||||
|
||||
return new Smarty_Undefined_Variable;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user