From: Michael Date: Mon, 4 Oct 2021 06:21:19 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/develop' into photo-guid X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=43a17b6129edf7c08160ba8cdc45de388f037dcc;p=friendica.git Merge remote-tracking branch 'upstream/develop' into photo-guid --- 43a17b6129edf7c08160ba8cdc45de388f037dcc diff --cc src/Module/Photo.php index 9ab258cf67,e1a8eef87b..660f908d22 --- a/src/Module/Photo.php +++ b/src/Module/Photo.php @@@ -108,16 -98,11 +108,16 @@@ class Photo extends BaseModul } // Please refactor this for the love of everything that's good - if (!empty($parameters['id'])) { + if (isset($parameters['id'])) { - $uid = $parameters['id']; + $id = $parameters['id']; + } + + if (empty($id)) { + Logger::notice('No picture id was detected', ['parameters' => $parameters]); + throw new HTTPException\NotFoundException(DI::l10n()->t('The Photo is not available.')); } - $photo = self::getAvatar($uid, $parameters['type'], $customsize ?: Proxy::PIXEL_SMALL); + $photo = self::getPhotoByid($id, $parameters['type'], $customsize ?: Proxy::PIXEL_SMALL); } else { $photoid = pathinfo($parameters['name'], PATHINFO_FILENAME); $scale = 0;