summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-07-18 00:20:30 -0400
committerEvan Prodromou <evan@prodromou.name>2008-07-18 00:20:30 -0400
commit3614c77d64f9ec96c9f4ed80c30ea2874e4c56d2 (patch)
tree11183b34aae80cfabc2ab164942d7a2895dac732 /actions
parent12b7f23ed2fd05a29dcd5ab7700a25330ffd5d5f (diff)
null reference error
darcs-hash:20080718042030-84dde-78e056f1e47335556d353cdf2940651f59291efd.gz
Diffstat (limited to 'actions')
-rw-r--r--actions/twitapifriendships.php9
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