fix google cse crash

This commit is contained in:
2026-10-24 03:24:52 -04:00
parent 33ce0a062b
commit e1d0ab121f
+9
View File
@@ -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"], " ."),