Skip to content

Commit 17504bd

Browse files
authored
Int|null variables must be integer or null
Enabled cache feature in product repository
1 parent 5788e74 commit 17504bd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/code/Magento/Catalog/Model/ProductRepository.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ public function __construct(
280280
*/
281281
public function get($sku, $editMode = false, $storeId = null, $forceReload = false)
282282
{
283+
$storeId = $storeId === null ? null : (int) $storeId;
283284
$cacheKey = $this->getCacheKey([$editMode, $storeId]);
284285
$cachedProduct = $this->getProductFromLocalCache($sku, $cacheKey);
285286
if ($cachedProduct === null || $forceReload) {

0 commit comments

Comments
 (0)