fixes #2484 force integer on width/height

... was string when original url was used as derivative url (when the original is smaller than the derivative dimensions)
This commit is contained in:
plegall
2025-12-22 11:45:20 +01:00
parent 27caef885e
commit 732145f6b7

View File

@@ -168,7 +168,7 @@ function ws_std_get_urls($image_row)
{
$size = $derivative->get_size();
$size != null or $size=array(null,null);
$derivatives_arr[$type] = array('url' => $derivative->get_url(), 'width'=>$size[0], 'height'=>$size[1] );
$derivatives_arr[$type] = array('url' => $derivative->get_url(), 'width'=>(int)$size[0], 'height'=>(int)$size[1] );
}
$ret['derivatives'] = $derivatives_arr;;
return $ret;