fix google cse crash
This commit is contained in:
@@ -725,6 +725,14 @@ class google_cse{
|
||||
// calculate rounded ratio
|
||||
if($found_size){
|
||||
|
||||
if(
|
||||
$width === 0 ||
|
||||
$height === 0
|
||||
){
|
||||
|
||||
$thumb["ratio"] = "1:1";
|
||||
}else{
|
||||
|
||||
$aspect_ratio = $width / $height;
|
||||
|
||||
if($aspect_ratio >= 1.5){
|
||||
@@ -740,6 +748,7 @@ class google_cse{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$out["web"][] = [
|
||||
"title" => rtrim($result["titleNoFormatting"], " ."),
|
||||
|
||||
Reference in New Issue
Block a user