From e52e09c9596b704c047c68ed7d9293bfd837441d Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Mon, 15 Jan 2024 00:04:23 -0600 Subject: [PATCH] Add value check in museum URL normalization --- lib/Museum.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Museum.php b/lib/Museum.php index 2d619234..baa4e583 100644 --- a/lib/Museum.php +++ b/lib/Museum.php @@ -22,6 +22,8 @@ class Museum extends PropertiesBase{ throw new Exceptions\InvalidUrlException($url); } + $parsedUrl['path'] = $parsedUrl['path'] ?? ''; + // We can't match on TLD because extracting the TLD for double-barrel TLDs, like .gov.uk, requires a whitelist. if(preg_match('/\brijksmuseum\.nl$/ius', $parsedUrl['host'])){