mirror of
https://github.com/friendica/friendica
synced 2024-11-10 04:22:54 +00:00
Fixes "Trying to access array offset on value of type bool"
This commit is contained in:
parent
ae2e8beaac
commit
8016f5c67c
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ class Attachment extends BaseFactory
|
|||
$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']]);
|
||||
if (empty($scale)) {
|
||||
if (!empty($preview)) {
|
||||
$preview_url = $this->baseUrl . '/photo/' . $photo['resource-id'] . '-' . $preview['scale'] . '.' . $ext;
|
||||
} else {
|
||||
$preview_url = '';
|
||||
|
|
Loading…
Reference in a new issue