From 7ad3f8ec15d46f42783274b6d2eee13fd0a2dcdf Mon Sep 17 00:00:00 2001 From: Andrii Beziazychnyi Date: Fri, 19 Jan 2024 17:00:41 +0200 Subject: [PATCH] MAGENTO#38365: Fixed wrong type for `InvalidArgumentException` to avoid fatal error --- app/code/Magento/Store/Model/StoreResolver.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Store/Model/StoreResolver.php b/app/code/Magento/Store/Model/StoreResolver.php index 2a950b699abe7..4d89fa462fa92 100644 --- a/app/code/Magento/Store/Model/StoreResolver.php +++ b/app/code/Magento/Store/Model/StoreResolver.php @@ -15,7 +15,7 @@ class StoreResolver implements \Magento\Store\Api\StoreResolverInterface /** * Cache tag */ - const CACHE_TAG = 'store_relations'; + public const CACHE_TAG = 'store_relations'; /** * @var \Magento\Store\Api\StoreRepositoryInterface @@ -107,7 +107,9 @@ public function getCurrentStoreId() if (is_array($storeCode)) { if (!isset($storeCode['_data']['code'])) { - throw new \InvalidArgumentException(__('Invalid store parameter.')); + throw new \InvalidArgumentException( + __('Invalid store parameter.')->render() + ); } $storeCode = $storeCode['_data']['code']; }