Parse URL when checking for approved museums

This commit is contained in:
Alex Cabal 2024-01-10 14:02:15 -06:00
parent 60eb118524
commit 57ed9c5c1e
2 changed files with 10 additions and 3 deletions

View file

@ -462,11 +462,11 @@ class Artwork extends PropertiesBase{
$parsedUrl = parse_url($url);
}
catch(Exception){
throw new InvalidUrlException($url);
throw new Exceptions\InvalidUrlException($url);
}
if(!is_array($parsedUrl)){
throw new InvalidUrlException($url);
throw new Exceptions\InvalidUrlException($url);
}
if(stripos($parsedUrl['host'], 'hathitrust.org') !== false){