diff --git a/vendor/magento/module-bundle/Model/ResourceModel/Indexer/Price/DisabledProductOptionPriceModifier.php b/vendor/magento/module-bundle/Model/ResourceModel/Indexer/Price/DisabledProductOptionPriceModifier.php
index 0da07eaff4aa..b3c3e74e1fa6 100644
--- a/vendor/magento/module-bundle/Model/ResourceModel/Indexer/Price/DisabledProductOptionPriceModifier.php
+++ b/vendor/magento/module-bundle/Model/ResourceModel/Indexer/Price/DisabledProductOptionPriceModifier.php
@@ -85,8 +85,9 @@ public function modifyPrice(IndexTableStructure $priceTable, array $entityIds =
         foreach ($this->getBundleIds($entityIds) as $entityId) {
             $entityId = (int) $entityId;
             foreach ($this->getWebsiteIdsOfProduct($entityId) as $websiteId) {
+                $websiteId = (int) $websiteId;
                 $productIdsDisabledRequired = $this->selectionProductsDisabledRequired
-                    ->getChildProductIds($entityId, (int)$websiteId);
+                    ->getChildProductIds($entityId, $websiteId);
                 if ($productIdsDisabledRequired) {
                     $connection = $this->resourceConnection->getConnection('indexer');
                     $select = $connection->select();
@@ -118,9 +119,8 @@ private function getWebsiteIdsOfProduct(int $entityId): array
             ['product_in_websites' => $this->resourceConnection->getTableName('catalog_product_website')],
             ['website_id']
         )->where('product_in_websites.product_id = ?', $entityId);
-        foreach ($connection->fetchCol($select) as $websiteId) {
-            $this->websiteIdsOfProduct[$entityId][] = (int)$websiteId;
-        }
+        $this->websiteIdsOfProduct[$entityId] = $connection->fetchCol($select);
+
         return $this->websiteIdsOfProduct[$entityId];
     }

