From 79e0277e93e1d6b6f0ac4e665a4a92fa66ffbeeb Mon Sep 17 00:00:00 2001 From: Luc Normandon Date: Thu, 28 Jun 2018 10:34:42 +0200 Subject: [PATCH] Fixed crash when mail_socolissimo isn't created --- CHANGELOG.md | 6 ++++++ Config/module.xml | 2 +- Listener/SendMail.php | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e27552c..d805577 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 1.4.6 +- Displays an arror message instead of crashing when "mail_socolissimo" isn't created, thus allowing to not send any confirmation email. + +# 1.4.5 +- Fixed crash when using getCartAmount while cartAmount is null + # 1.4.4 - create loops: AreaFreeshippingDom and AreaFreeshippingPr - update template for to add these loops diff --git a/Config/module.xml b/Config/module.xml index 4daddf6..095ed85 100755 --- a/Config/module.xml +++ b/Config/module.xml @@ -7,7 +7,7 @@ So Colissimo - 1.4.5 + 1.4.6 Thelia info@thelia.net diff --git a/Listener/SendMail.php b/Listener/SendMail.php index 172bfc3..7eea805 100755 --- a/Listener/SendMail.php +++ b/Listener/SendMail.php @@ -64,7 +64,7 @@ public function updateStatus(OrderEvent $event) ->filterByName('mail_socolissimo') ->findOne(); - if (false === $message) { + if (false === $message || null === $message) { throw new \Exception("Failed to load message 'order_confirmation'."); }