Add value check in museum URL normalization

This commit is contained in:
Alex Cabal 2024-01-15 00:04:23 -06:00
parent b178bcb6fa
commit e52e09c959

View file

@ -22,6 +22,8 @@ class Museum extends PropertiesBase{
throw new Exceptions\InvalidUrlException($url); 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. // 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'])){ if(preg_match('/\brijksmuseum\.nl$/ius', $parsedUrl['host'])){