summaryrefslogtreecommitdiff
path: root/actions/apifriendshipscreate.php
diff options
context:
space:
mode:
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.'),