diff options
Diffstat (limited to 'actions')
-rw-r--r-- | actions/twitapifriendships.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/actions/twitapifriendships.php b/actions/twitapifriendships.php index fe9ee2ad5..29c2311b3 100644 --- a/actions/twitapifriendships.php +++ b/actions/twitapifriendships.php @@ -145,7 +145,11 @@ class TwitapifriendshipsAction extends TwitterapiAction { return Profile::staticGet($id); } else { $user = User::staticGet('nickname', $id); - return $user->getProfile(); + if ($user) { + return $user->getProfile(); + } else { + return NULL; + } } } @@ -153,8 +157,7 @@ class TwitapifriendshipsAction extends TwitterapiAction { if (is_numeric($id)) { return User::staticGet($id); } else { - $user = User::staticGet('nickname', $id); - return $user->getProfile(); + return User::staticGet('nickname', $id); } } }
\ No newline at end of file |