error handling for invalid pagetype

This commit is contained in:
lolcat 2024-03-29 05:15:53 -04:00
parent ba7ed59dc5
commit 0f39d9c187
2 changed files with 11 additions and 1 deletions

View file

@ -1020,7 +1020,15 @@ class google{
self::is_class
),
"div"
)[1];
);
if(!isset($description[1])){
throw new Exception("Google returned an unsupported page format (will fix)");
}else{
$description = $description[1];
}
// get date (rare)
$date =