This commit is contained in:
E. S. 2024-03-15 17:36:34 +00:00
parent 8d72b7d1e7
commit 3414ec1113

View File

@ -209,7 +209,11 @@ class PostText extends model {
$images_affected = 0;
$uploads = uploads::getUploadsByRandomId(array_keys($images), true);
foreach ($uploads as $u) {
foreach ($uploads as $upload_key => $u) {
if ($u === null) {
logError(__METHOD__.': upload '.$upload_key.' is null');
continue;
}
foreach ($images[$u->randomId] as $s) {
list($w, $h) = $s;
list($w, $h) = $u->getImagePreviewSize($w, $h);