diff --git a/application/Espo/Services/Import.php b/application/Espo/Services/Import.php index 11692bd632..89e13c38d5 100644 --- a/application/Espo/Services/Import.php +++ b/application/Espo/Services/Import.php @@ -416,9 +416,9 @@ class Import extends \Espo\Services\Record } if (in_array($action, ['createAndUpdate', 'update'])) { + $updateByFieldList = []; + $whereClause = array(); if (!empty($params['updateBy']) && is_array($params['updateBy'])) { - $updateByFieldList = []; - $whereClause = array(); foreach ($params['updateBy'] as $i) { if (array_key_exists($i, $importFieldList)) { $updateByFieldList[] = $importFieldList[$i];