We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 413c1cbd authored by Ángel Campos's avatar Ángel Campos Committed by GitHub

[PW-2382]: Checking if the _order object is set before attempting to add comment (#706)

parent 1d378b64
......@@ -1965,7 +1965,9 @@ class Cron
private function addNotificationErrorComment($errorMessage)
{
$comment = __('The order failed to update: %1', $errorMessage);
$this->_order->addStatusHistoryComment($comment);
$this->_order->save();
if ($this->_order) {
$this->_order->addStatusHistoryComment($comment);
$this->_order->save();
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment