From 8dc8fc23c87cd7a984e089b69d5fa2645446fc54 Mon Sep 17 00:00:00 2001 From: Tino Goratsch Date: Fri, 19 Feb 2016 09:44:07 +0100 Subject: [PATCH] Optimization for Smarty_Internal_Data::assign() Removed the extra if block, when an array has been given as the $tpl_var argument, because in the else block there is already a "not empty check". --- libs/sysplugins/smarty_internal_data.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/sysplugins/smarty_internal_data.php b/libs/sysplugins/smarty_internal_data.php index 2d65ef9f..59366b77 100644 --- a/libs/sysplugins/smarty_internal_data.php +++ b/libs/sysplugins/smarty_internal_data.php @@ -95,9 +95,7 @@ class Smarty_Internal_Data { if (is_array($tpl_var)) { foreach ($tpl_var as $_key => $_val) { - if ($_key != '') { - $this->assign($_key, $_val, $nocache); - } + $this->assign($_key, $_val, $nocache); } } else { if ($tpl_var != '') {