GET, HEAD, DELETE are strings not constants
This commit is contained in:
parent
96babc59f5
commit
687f8ab42c
@ -103,17 +103,16 @@ class AtompubshowfavoriteAction extends ApiAuthAction
|
|||||||
parent::handle($argarray);
|
parent::handle($argarray);
|
||||||
|
|
||||||
switch ($_SERVER['REQUEST_METHOD']) {
|
switch ($_SERVER['REQUEST_METHOD']) {
|
||||||
case GET:
|
case 'GET':
|
||||||
case HEAD:
|
case 'HEAD':
|
||||||
$this->showFave();
|
$this->showFave();
|
||||||
break;
|
break;
|
||||||
case DELETE:
|
case 'DELETE':
|
||||||
$this->deleteFave();
|
$this->deleteFave();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// TRANS: Client exception thrown using an unsupported HTTP method.
|
// TRANS: Client exception thrown using an unsupported HTTP method.
|
||||||
throw new ClientException(_('HTTP method not supported.'),
|
throw new ClientException(_('HTTP method not supported.'), 405);
|
||||||
405);
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user