summaryrefslogtreecommitdiff
path: root/actions/apifriendshipsdestroy.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/apifriendshipsdestroy.php')
-rw-r--r--actions/apifriendshipsdestroy.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/actions/apifriendshipsdestroy.php b/actions/apifriendshipsdestroy.php
index d97c5aa6d..ef864c4db 100644
--- a/actions/apifriendshipsdestroy.php
+++ b/actions/apifriendshipsdestroy.php
@@ -101,6 +101,15 @@ class ApiFriendshipsDestroyAction 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 unfollow user: User not found.'),