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