diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-07-18 00:20:30 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-07-18 00:20:30 -0400 |
commit | 3614c77d64f9ec96c9f4ed80c30ea2874e4c56d2 (patch) | |
tree | 11183b34aae80cfabc2ab164942d7a2895dac732 | |
parent | 12b7f23ed2fd05a29dcd5ab7700a25330ffd5d5f (diff) |
null reference error
darcs-hash:20080718042030-84dde-78e056f1e47335556d353cdf2940651f59291efd.gz
-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 |