mirror of
https://github.com/flarum/core.git
synced 2025-08-07 00:47:00 +02:00
Throw HTTP 403 on extension validation error
The way I read it, HTTP 405 is a generic statement about the resource. Once a language pack is not the default, this is not true anymore, so I figured 403 is more correct.
This commit is contained in:
22
src/Http/Exception/ForbiddenException.php
Normal file
22
src/Http/Exception/ForbiddenException.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Http\Exception;
|
||||
|
||||
use Exception;
|
||||
|
||||
class ForbiddenException extends Exception
|
||||
{
|
||||
public function __construct($message = null, $code = 403, Exception $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user