summaryrefslogtreecommitdiff
path: root/lib/smarty3/sysplugins/smarty_internal_method_append.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/smarty3/sysplugins/smarty_internal_method_append.php')
-rw-r--r--lib/smarty3/sysplugins/smarty_internal_method_append.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/smarty3/sysplugins/smarty_internal_method_append.php b/lib/smarty3/sysplugins/smarty_internal_method_append.php
index b89aacf..881375e 100644
--- a/lib/smarty3/sysplugins/smarty_internal_method_append.php
+++ b/lib/smarty3/sysplugins/smarty_internal_method_append.php
@@ -25,10 +25,10 @@ class Smarty_Internal_Method_Append
* @link http://www.smarty.net/docs/en/api.append.tpl
*
* @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $data
- * @param array|string $tpl_var the template variable name(s)
- * @param mixed $value the value to append
- * @param bool $merge flag if array elements shall be merged
- * @param bool $nocache if true any output of this variable will
+ * @param array|string $tpl_var the template variable name(s)
+ * @param mixed $value the value to append
+ * @param bool $merge flag if array elements shall be merged
+ * @param bool $nocache if true any output of this variable will
* be not cached
*
* @return \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty
@@ -38,12 +38,12 @@ class Smarty_Internal_Method_Append
if (is_array($tpl_var)) {
// $tpl_var is an array, ignore $value
foreach ($tpl_var as $_key => $_val) {
- if ($_key != '') {
+ if ($_key !== '') {
$this->append($data, $_key, $_val, $merge, $nocache);
}
}
} else {
- if ($tpl_var != '' && isset($value)) {
+ if ($tpl_var !== '' && isset($value)) {
if (!isset($data->tpl_vars[ $tpl_var ])) {
$tpl_var_inst = $data->ext->getTemplateVars->_getVariable($data, $tpl_var, null, true, false);
if ($tpl_var_inst instanceof Smarty_Undefined_Variable) {
@@ -52,8 +52,8 @@ class Smarty_Internal_Method_Append
$data->tpl_vars[ $tpl_var ] = clone $tpl_var_inst;
}
}
- if (!(is_array($data->tpl_vars[ $tpl_var ]->value) ||
- $data->tpl_vars[ $tpl_var ]->value instanceof ArrayAccess)
+ if (!(is_array($data->tpl_vars[ $tpl_var ]->value)
+ || $data->tpl_vars[ $tpl_var ]->value instanceof ArrayAccess)
) {
settype($data->tpl_vars[ $tpl_var ]->value, 'array');
}
@@ -65,10 +65,10 @@ class Smarty_Internal_Method_Append
$data->tpl_vars[ $tpl_var ]->value[] = $value;
}
}
- if ($data->_objType == 2 && $data->scope) {
+ if ($data->_isTplObj() && $data->scope) {
$data->ext->_updateScope->_updateScope($data, $tpl_var);
}
}
return $data;
}
-} \ No newline at end of file
+}