From 687f8ab42ca574c42506be6486cc7c9ceb67290c Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Tue, 1 Jul 2014 11:12:28 +0200 Subject: [PATCH] GET, HEAD, DELETE are strings not constants --- plugins/Favorite/actions/atompubshowfavorite.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/Favorite/actions/atompubshowfavorite.php b/plugins/Favorite/actions/atompubshowfavorite.php index 436e88e693..c71f1a11b3 100644 --- a/plugins/Favorite/actions/atompubshowfavorite.php +++ b/plugins/Favorite/actions/atompubshowfavorite.php @@ -103,17 +103,16 @@ class AtompubshowfavoriteAction extends ApiAuthAction parent::handle($argarray); switch ($_SERVER['REQUEST_METHOD']) { - case GET: - case HEAD: + case 'GET': + case 'HEAD': $this->showFave(); break; - case DELETE: + case 'DELETE': $this->deleteFave(); break; default: // TRANS: Client exception thrown using an unsupported HTTP method. - throw new ClientException(_('HTTP method not supported.'), - 405); + throw new ClientException(_('HTTP method not supported.'), 405); } return true; }