diff --git a/vendor/magento/module-customer/Model/EmailNotification.php b/vendor/magento/module-customer/Model/EmailNotification.php
index a71cf79a4f51b..210d5290a66fe 100644
--- a/vendor/magento/module-customer/Model/EmailNotification.php
+++ b/vendor/magento/module-customer/Model/EmailNotification.php
@@ -342,7 +342,7 @@ private function getWebsiteStoreId($customer, $defaultStoreId = null): int
             $storeIds = $this->storeManager->getWebsite($customer->getWebsiteId())->getStoreIds();
             $defaultStoreId = reset($storeIds);
         }
-        return $defaultStoreId;
+        return (int)$defaultStoreId;
     }
 
     /**
