mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
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".
This commit is contained in:
@@ -95,10 +95,8 @@ class Smarty_Internal_Data
|
||||
{
|
||||
if (is_array($tpl_var)) {
|
||||
foreach ($tpl_var as $_key => $_val) {
|
||||
if ($_key != '') {
|
||||
$this->assign($_key, $_val, $nocache);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($tpl_var != '') {
|
||||
if ($this->_objType == 2) {
|
||||
|
Reference in New Issue
Block a user