X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FHoverCard.php;h=ae107ca17229e3bfdef7fea1263f96a53d60be47;hb=018abb4d1dfbe0bf29b441dce281d89a437075b4;hp=c2b1d6b46d74d19043705549aa8c0b2547dbc531;hpb=a7dd0173a735291bee4d57bb3d9adcf064feb34d;p=friendica.git
diff --git a/src/Module/HoverCard.php b/src/Module/HoverCard.php
index c2b1d6b46d..ae107ca172 100644
--- a/src/Module/HoverCard.php
+++ b/src/Module/HoverCard.php
@@ -1,4 +1,23 @@
.
+ *
+ */
namespace Friendica\Module;
@@ -7,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
@@ -25,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)) {
@@ -56,7 +79,7 @@ class HoverCard extends BaseModule
$uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $baseUrl->getHostname() . ($baseUrl->getUrlPath() ? '/' . $baseUrl->getUrlPath() : ''));
- $page['htmlhead'] .= '' . "\r\n";
+ $page['htmlhead'] .= '' . "\r\n";
$page['htmlhead'] .= '' . "\r\n";
$page['htmlhead'] .= '' . "\r\n";
header('Link: <' . $baseUrl->get() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);