diff --git a/mod/photos.php b/mod/photos.php index 4512921074..bd56fbbc6a 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -65,6 +65,9 @@ function photos_init(App $a) { if (DI::args()->getArgc() > 1) { $owner = User::getOwnerDataByNick(DI::args()->getArgv()[1]); + if (!$owner) { + throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.')); + } $is_owner = (local_user() && (local_user() == $owner['uid']));