Skip to content

Commit

Permalink
add MethodNotAllowedException to abort handler
Browse files Browse the repository at this point in the history
  • Loading branch information
nkissebe committed Sep 11, 2024
1 parent e3970c8 commit b5c955b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/libraries/Hubzero/Base/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Hubzero\Container\Container;
use Hubzero\Error\Exception\NotAuthorizedException;
use Hubzero\Error\Exception\NotFoundException;
use Hubzero\Error\Exception\MethodNotAllowedException;
use Hubzero\Error\Exception\RuntimeException;
use Hubzero\Facades\Facade;
use Hubzero\Http\RedirectResponse;
Expand Down Expand Up @@ -265,6 +266,10 @@ public function abort($code, $message='')
{
switch ($code)
{
case 405:
throw new MethodNotAllowedException($message, $code);
break;

case 404:
throw new NotFoundException($message, $code);
break;
Expand Down

0 comments on commit b5c955b

Please sign in to comment.