Skip to content

Commit

Permalink
Bug in cron
Browse files Browse the repository at this point in the history
  • Loading branch information
Phạm Quốc Đạt committed Jun 6, 2018
1 parent 378666f commit c8e1aa3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion classes/SplitpaymentDeadline.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public function pay($update = false)
$this->status = SplitpaymentDeadline::STATUS_FAILED;
$message = Tools::displayError("An error occurred while trying to pay split payment.
Error code: " . $res->lwError->CODE . " - Message: " . $res->lwError->MSG);
throw new Exception($message, $res->lwError->CODE);
throw new Exception($message, (int)$res->lwError->CODE);
} else {
Logger::AddLog(print_r($res, true));

Expand Down
7 changes: 6 additions & 1 deletion controllers/front/cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ public function postProcess()

/* @var $splitpayment SplitpaymentDeadline */
foreach ($splitpaymentCollection as $splitpayment) {
$splitpayment->pay(true);
try {
$splitpayment->pay(true);
} catch (Exception $e) {
echo $e;
continue;
}
}

$this->setRunningState(false);
Expand Down

0 comments on commit c8e1aa3

Please sign in to comment.