From c002b8008c9de7451051de3443a20edfbe104ed5 Mon Sep 17 00:00:00 2001 From: Fabio Daniele Date: Sun, 11 Feb 2018 03:38:59 +0100 Subject: [PATCH] Fix crasher If checkApiCredentials fail for missing properties, it can badly break checkout and other modules --- app/code/community/Mailjet/Iframes/Model/Observer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/community/Mailjet/Iframes/Model/Observer.php b/app/code/community/Mailjet/Iframes/Model/Observer.php index 016b278..c094a11 100644 --- a/app/code/community/Mailjet/Iframes/Model/Observer.php +++ b/app/code/community/Mailjet/Iframes/Model/Observer.php @@ -236,6 +236,8 @@ public function customerSaveSync(Varien_Event_Observer $observer) $credentialsOk = Mailjet_Iframes_Helper_Config::checkApiCredentials(); if($credentialsOk) { $syncManager = new Mailjet_Iframes_Helper_SyncManager(); + } else { + return false; } $customer = $observer->getCustomer(); @@ -319,4 +321,4 @@ private function _isSubscribed($email) } -?> \ No newline at end of file +?>