summaryrefslogtreecommitdiff
path: root/lib/smarty3/sysplugins/smarty_internal_method_appendbyref.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/smarty3/sysplugins/smarty_internal_method_appendbyref.php')
-rw-r--r--lib/smarty3/sysplugins/smarty_internal_method_appendbyref.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/smarty3/sysplugins/smarty_internal_method_appendbyref.php b/lib/smarty3/sysplugins/smarty_internal_method_appendbyref.php
index 64190d1..c959044 100644
--- a/lib/smarty3/sysplugins/smarty_internal_method_appendbyref.php
+++ b/lib/smarty3/sysplugins/smarty_internal_method_appendbyref.php
@@ -11,7 +11,6 @@
*/
class Smarty_Internal_Method_AppendByRef
{
-
/**
* appends values to template variables by reference
*
@@ -19,15 +18,15 @@ class Smarty_Internal_Method_AppendByRef
* @link http://www.smarty.net/docs/en/api.append.by.ref.tpl
*
* @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $data
- * @param string $tpl_var the template variable name
- * @param mixed &$value the referenced value to append
- * @param bool $merge flag if array elements shall be merged
+ * @param string $tpl_var the template variable name
+ * @param mixed &$value the referenced value to append
+ * @param bool $merge flag if array elements shall be merged
*
* @return \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty
*/
public static function appendByRef(Smarty_Internal_Data $data, $tpl_var, &$value, $merge = false)
{
- if ($tpl_var != '' && isset($value)) {
+ if ($tpl_var !== '' && isset($value)) {
if (!isset($data->tpl_vars[ $tpl_var ])) {
$data->tpl_vars[ $tpl_var ] = new Smarty_Variable();
}
@@ -41,10 +40,10 @@ class Smarty_Internal_Method_AppendByRef
} else {
$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
+}