diff --git a/eZ/Publish/Core/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php b/eZ/Publish/Core/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php index fec16046f9..baf3bbe15e 100644 --- a/eZ/Publish/Core/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php +++ b/eZ/Publish/Core/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php @@ -56,13 +56,9 @@ public function match(View $view) if (!$view instanceof LocationValueView) { return false; } - try { - $parent = $this->loadParentLocation( - $view->getLocation()->parentLocationId - ); - } catch (\eZ\Publish\API\Repository\Exceptions\NotFoundException $e) { - return false; - } + $parent = $this->loadParentLocation( + $view->getLocation()->parentLocationId + ); return isset($this->values[$parent->getContentInfo()->contentTypeId]); } diff --git a/eZ/Publish/Core/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php b/eZ/Publish/Core/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php index d7a95862e7..612f2e6616 100644 --- a/eZ/Publish/Core/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php +++ b/eZ/Publish/Core/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php @@ -25,19 +25,15 @@ class ParentContentType extends MultipleValued */ public function matchLocation(APILocation $location) { - try { - $parentContentType = $this->repository->sudo( - static function (Repository $repository) use ($location) { - $parent = $repository->getLocationService()->loadLocation($location->parentLocationId); + $parentContentType = $this->repository->sudo( + static function (Repository $repository) use ($location) { + $parent = $repository->getLocationService()->loadLocation($location->parentLocationId); - return $repository - ->getContentTypeService() - ->loadContentType($parent->getContentInfo()->contentTypeId); - } - ); - } catch (\eZ\Publish\API\Repository\Exceptions\NotFoundException $e) { - return false; - } + return $repository + ->getContentTypeService() + ->loadContentType($parent->getContentInfo()->contentTypeId); + } + ); return isset($this->values[$parentContentType->identifier]); }