Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
kamel committed Jul 21, 2022
1 parent 8d05185 commit 1bacba0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,7 @@ function runTrigger($action,$object,$user,$langs,$conf)
$eCommerceSynchro->connect();
if (count($eCommerceSynchro->errors)) {
$error++;
$object->errors[] = $eCommerceSynchro->errorsToString();
setEventMessages($eCommerceSynchro->error, $eCommerceSynchro->errors, 'errors');
}

Expand All @@ -1073,7 +1074,7 @@ function runTrigger($action,$object,$user,$langs,$conf)
if (!$result) {
$error++;
$this->errors[] = $eCommerceSynchro->eCommerceRemoteAccess->error;
$this->errors = array_merge($this->errors, $eCommerceSynchro->eCommerceRemoteAccess->errors);
$object->errors = array_merge($this->errors, $eCommerceSynchro->eCommerceRemoteAccess->errors);
}
}

Expand All @@ -1084,7 +1085,7 @@ function runTrigger($action,$object,$user,$langs,$conf)
$error++;
$error_msg = $langs->trans('ECommerceUpdateRemoteProductLink', $object->id, $site->name, $eCommerceProduct->error);
$this->errors[] = $error_msg;
$this->errors = array_merge($this->errors, $eCommerceProduct->errors);
$object->errors = array_merge($this->errors, $eCommerceProduct->errors);
dol_syslog(__METHOD__ . ': Error:' . $error_msg, LOG_WARNING);
}
}
Expand All @@ -1094,7 +1095,7 @@ function runTrigger($action,$object,$user,$langs,$conf)
}
} catch (Exception $e) {
$error++;
$this->errors[] = 'Trigger exception : ' . $e->getMessage();
$object->errors[] = 'Trigger exception : ' . $e->getMessage();
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id . " " . 'Trigger exception : ' . $e->getMessage());
break;
}
Expand Down

0 comments on commit 1bacba0

Please sign in to comment.