mirror of
https://github.com/friendica/friendica
synced 2024-12-23 17:20:16 +00:00
Add check for $a->profile structure in Module\HoverCard
This commit is contained in:
parent
2db04b0c34
commit
ad66a92deb
1 changed files with 6 additions and 2 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue