From 9271c533064c981e6ef8ac3e704cfdbe9f04eb45 Mon Sep 17 00:00:00 2001 From: Danny van der Sluijs Date: Tue, 31 Dec 2024 11:40:51 +0100 Subject: [PATCH] fix: Resolve scope within try-catch (#221) --- MetaDataTool/Crawlers/EndpointCrawler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MetaDataTool/Crawlers/EndpointCrawler.php b/MetaDataTool/Crawlers/EndpointCrawler.php index b275dd9..9e23bb6 100644 --- a/MetaDataTool/Crawlers/EndpointCrawler.php +++ b/MetaDataTool/Crawlers/EndpointCrawler.php @@ -73,8 +73,8 @@ private function crawlWebPage(string $url): ?Endpoint $this->domCrawler->add($html); $endpoint = $this->domCrawler->filterXPath('//*[@id="endpoint"]')->first()->text(); - $scope = $this->domCrawler->filterXPath('//*[@id="scope"]')->first()->text(); try { + $scope = $this->domCrawler->filterXPath('//*[@id="scope"]')->first()->text(); $uri = $this->domCrawler->filterXPath('//*[@id="serviceUri"]')->first()->text(); } catch (\Exception) { return null;