]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
GET, HEAD, DELETE are strings not constants
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 1 Jul 2014 09:12:28 +0000 (11:12 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Wed, 2 Jul 2014 09:38:27 +0000 (11:38 +0200)
plugins/Favorite/actions/atompubshowfavorite.php

index 436e88e6939e548f3e7b9ce0dd1a00bfc4b48279..c71f1a11b33b19162510d8820eb536f5501af269 100644 (file)
@@ -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;
     }