summaryrefslogtreecommitdiff
path: root/actions/apifriendshipscreate.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2009-10-05 13:25:34 -0700
committerZach Copley <zach@status.net>2009-10-05 13:25:34 -0700
commit62d1475df1c85c63f6d0dc4628a912c7666c2d21 (patch)
tree120fd7ffd516448b4882a4d59e09b3d02d7293f7 /actions/apifriendshipscreate.php
parent2b7d8d0c29a9b28700828db5184ed6d1dc7b1922 (diff)
Add in a check for proper format
Diffstat (limited to 'actions/apifriendshipscreate.php')
-rw-r--r--actions/apifriendshipscreate.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/actions/apifriendshipscreate.php b/actions/apifriendshipscreate.php
index d691b5b4f..969fc1282 100644
--- a/actions/apifriendshipscreate.php
+++ b/actions/apifriendshipscreate.php
@@ -101,6 +101,15 @@ class ApiFriendshipsCreateAction extends ApiAuthAction
return;
}
+ if (!in_array($this->format, array('xml', 'json'))) {
+ $this->clientError(
+ _('API method not found!'),
+ 404,
+ $this->format
+ );
+ return;
+ }
+
if (empty($this->other)) {
$this->clientError(
_('Could not follow user: User not found.'),