forked from lolcat/4get
handle google api no results
This commit is contained in:
@@ -583,7 +583,8 @@ class google_api{
|
|||||||
|
|
||||||
if(!isset($json["items"])){
|
if(!isset($json["items"])){
|
||||||
|
|
||||||
throw new Exception("Failed to access items array");
|
// google just doesnt return items when theres no results
|
||||||
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($json["items"] as $result){
|
foreach($json["items"] as $result){
|
||||||
|
Reference in New Issue
Block a user