From d04c4d9762e8da4fc8efde886451ab00b302922b Mon Sep 17 00:00:00 2001 From: Quazz Date: Tue, 7 Sep 2021 16:24:58 +0200 Subject: [PATCH] Make sure to pass int to loadBySubscriberEmail Second variable should always be int for loadBySubscriberEmail. However, sometimes Store->getWebsiteId() returns string or null Therefore we must cast it to int before passing it along. --- Model/Order/Delete/Processor/SubscriberDataProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model/Order/Delete/Processor/SubscriberDataProcessor.php b/Model/Order/Delete/Processor/SubscriberDataProcessor.php index e50bc6cf..c3c6180e 100644 --- a/Model/Order/Delete/Processor/SubscriberDataProcessor.php +++ b/Model/Order/Delete/Processor/SubscriberDataProcessor.php @@ -61,7 +61,7 @@ public function execute(int $orderId): bool $subscriber = $this->subscriberFactory->create(); $subscriber->loadBySubscriberEmail( $order->getCustomerEmail(), - $this->storeManager->getStore($order->getStoreId())->getWebsiteId() + (int) $this->storeManager->getStore($order->getStoreId())->getWebsiteId() ); $this->subscriberResource->delete($subscriber);