forked from GNUsocial/gnu-social
don't cause an error on non-user profile in api
This commit is contained in:
parent
642901f4ae
commit
d214d4533c
@ -215,7 +215,7 @@ class ApiAction extends Action
|
|||||||
Avatar::defaultImage(AVATAR_STREAM_SIZE);
|
Avatar::defaultImage(AVATAR_STREAM_SIZE);
|
||||||
|
|
||||||
$twitter_user['url'] = ($profile->homepage) ? $profile->homepage : null;
|
$twitter_user['url'] = ($profile->homepage) ? $profile->homepage : null;
|
||||||
$twitter_user['protected'] = ($user->private_stream) ? true : false;
|
$twitter_user['protected'] = (!empty($user) && $user->private_stream) ? true : false;
|
||||||
$twitter_user['followers_count'] = $profile->subscriberCount();
|
$twitter_user['followers_count'] = $profile->subscriberCount();
|
||||||
|
|
||||||
// Note: some profiles don't have an associated user
|
// Note: some profiles don't have an associated user
|
||||||
|
Loading…
Reference in New Issue
Block a user