From 62d1475df1c85c63f6d0dc4628a912c7666c2d21 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Mon, 5 Oct 2009 13:25:34 -0700 Subject: Add in a check for proper format --- actions/apifriendshipsdestroy.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'actions/apifriendshipsdestroy.php') 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.'), -- cgit v1.2.3-54-g00ecf