1
0
Fork 0

Fixes "Trying to access array offset on value of type bool"

This commit is contained in:
Michael 2023-04-11 18:47:51 +00:00
parent ae2e8beaac
commit 8016f5c67c

View file

@ -136,7 +136,7 @@ class Attachment extends BaseFactory
$url = $this->baseUrl . '/photo/' . $photo['resource-id'] . '-0.' . $ext; $url = $this->baseUrl . '/photo/' . $photo['resource-id'] . '-0.' . $ext;
$preview = Photo::selectFirst(['scale'], ["`resource-id` = ? AND `uid` = ? AND `scale` > ?", $photo['resource-id'], $photo['uid'], 0], ['order' => ['scale']]); $preview = Photo::selectFirst(['scale'], ["`resource-id` = ? AND `uid` = ? AND `scale` > ?", $photo['resource-id'], $photo['uid'], 0], ['order' => ['scale']]);
if (empty($scale)) { if (!empty($preview)) {
$preview_url = $this->baseUrl . '/photo/' . $photo['resource-id'] . '-' . $preview['scale'] . '.' . $ext; $preview_url = $this->baseUrl . '/photo/' . $photo['resource-id'] . '-' . $preview['scale'] . '.' . $ext;
} else { } else {
$preview_url = ''; $preview_url = '';