1
0
Fork 0

Merge pull request #11073 from MrPetovan/bug/notices

Suppress Undefined property message in Core\Protocol
This commit is contained in:
Tobias Diekershoff 2021-12-07 07:06:16 +01:00 committed by GitHub
commit ee3eef7df5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -176,7 +176,7 @@ class Protocol
$statusnet_user = $matches[2];
$UserData = DI::httpClient()->fetch('http://' . $statusnet_host . '/api/users/show.json?user_id=' . $statusnet_user);
$user = json_decode($UserData);
if ($user) {
if (!empty($user->screen_name)) {
$matches[2] = $user->screen_name;
return self::STATUSNET;
}