diff --git a/mod/fbrowser.php b/mod/fbrowser.php index 359e83e111..45e960fece 100644 --- a/mod/fbrowser.php +++ b/mod/fbrowser.php @@ -79,7 +79,7 @@ function fbrowser_content(App $a) $filename_e = $rr['filename']; // Take the largest picture that is smaller or equal 640 pixels - $photo = Photo::selectFirst(['scale'], ["`resource-id` = ? AND `height` <= ? AND `width` <= ?", $rr['resource-id'], 640, 640, ['order' => ['scale']]]); + $photo = Photo::selectFirst(['scale'], ["`resource-id` = ? AND `height` <= ? AND `width` <= ?", $rr['resource-id'], 640, 640], ['order' => ['scale']]); $scale = $photo['scale'] ?? $rr['loq']; return [ diff --git a/mod/ping.php b/mod/ping.php index db5bc04461..178d297a42 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -207,7 +207,7 @@ function ping_init(App $a) $cachekey = "ping_init:".local_user(); $ev = DI::cache()->get($cachekey); if (is_null($ev)) { - $ev = DBA::selectToArray('event', ['type', 'start', 'adjust'], + $ev = DBA::selectToArray('event', ['type', 'start'], ["`uid` = ? AND `start` < ? AND `finish` > ? AND NOT `ignore`", local_user(), DateTimeFormat::utc('now + 7 days'), DateTimeFormat::utcNow()]); if (DBA::isResult($ev)) {