X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FHoverCard.php;h=ae107ca17229e3bfdef7fea1263f96a53d60be47;hb=3f523a88b0af4e2a73b29917da33d221abef9647;hp=f3b8248a6b198fe59e26dcaeb407effaa9207c67;hpb=d09b3f5bdeae444f785f6283e55dbf2f61caadac;p=friendica.git diff --git a/src/Module/HoverCard.php b/src/Module/HoverCard.php index f3b8248a6b..ae107ca172 100644 --- a/src/Module/HoverCard.php +++ b/src/Module/HoverCard.php @@ -26,7 +26,7 @@ use Friendica\Core\Session; use Friendica\DI; use Friendica\Model\Profile; use Friendica\Model\User; -use Friendica\Network\HTTPException\NotFoundException; +use Friendica\Network\HTTPException; /** * Loads a profile for the HoverCard view @@ -44,11 +44,15 @@ class HoverCard extends BaseModule // Show the profile hovercard $nickname = $parameters['profile']; } else { - throw new NotFoundException(DI::l10n()->t('No profile')); + throw new HTTPException\NotFoundException(DI::l10n()->t('No profile')); } Profile::load($a, $nickname); + if (empty($a->profile)) { + throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.')); + } + $page = DI::page(); if (!empty($a->profile['page-flags']) && ($a->profile['page-flags'] == User::PAGE_FLAGS_COMMUNITY)) {