mirror of
https://github.com/friendica/friendica
synced 2024-12-23 17:20:16 +00:00
Add error handling in Module\Xrd
- Address part of https://github.com/friendica/friendica/issues/8475#issuecomment-653912096
This commit is contained in:
parent
5c0e079ca6
commit
f2adec6a7f
1 changed files with 5 additions and 0 deletions
|
@ -85,6 +85,11 @@ class Xrd extends BaseModule
|
|||
|
||||
$owner = User::getOwnerDataById($user['uid']);
|
||||
|
||||
if (empty($owner)) {
|
||||
DI::logger()->warning('No owner data for user id', ['uri' => $uri, 'name' => $name, 'user' => $user]);
|
||||
throw new \Friendica\Network\HTTPException\NotFoundException();
|
||||
}
|
||||
|
||||
$alias = str_replace('/profile/', '/~', $owner['url']);
|
||||
|
||||
$avatar = Photo::selectFirst(['type'], ['uid' => $owner['uid'], 'profile' => true]);
|
||||
|
|
Loading…
Reference in a new issue