Commit d214d453 authored by Evan Prodromou's avatar Evan Prodromou

don't cause an error on non-user profile in api

parent 642901f4
......@@ -215,7 +215,7 @@ class ApiAction extends Action
Avatar::defaultImage(AVATAR_STREAM_SIZE);
$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();
// Note: some profiles don't have an associated user
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment