Skip to content

Commit 9c458fd

Browse files
author
ahuininga-orisha
committed
Grumphp fixes
1 parent 9367c81 commit 9c458fd

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/Model/LandingPage.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\Framework\Model\AbstractExtensibleModel;
1313
use Magento\Framework\Registry;
1414
use Magento\Framework\Model\Context;
15+
use Exception;
1516
use Magento\Framework\Model\ResourceModel\AbstractResource;
1617

1718
/**
@@ -353,7 +354,7 @@ public function getUnserializedFilterAttributes(): array
353354

354355
try {
355356
$result = unserialize($raw, ['allowed_classes' => false]);
356-
} catch (\Throwable $e) {
357+
} catch (Exception $e) {
357358
return [];
358359
}
359360

src/Model/UrlFinder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Emico\AttributeLanding\Api\Data\FilterInterface;
1111
use Emico\AttributeLanding\Api\Data\LandingPageInterface;
1212
use Emico\AttributeLanding\Api\LandingPageRepositoryInterface;
13+
use Exception;
1314
use Magento\Framework\Api\SearchCriteriaBuilder;
1415
use Magento\Framework\App\CacheInterface;
1516
use Magento\Framework\Serialize\SerializerInterface;
@@ -152,7 +153,7 @@ protected function loadPageLookupArray(): array
152153
foreach ($this->landingPageRepository->getList($searchCriteria)->getItems() as $landingPage) {
153154
try {
154155
$filters = $landingPage->getFilters();
155-
} catch (\Throwable $e) {
156+
} catch (Exception $e) {
156157
continue;
157158
}
158159

0 commit comments

Comments
 (0)