Skip to content

Commit 7ecb28b

Browse files
committed
[L6] No longer necessary with L5.8
1 parent bd8b708 commit 7ecb28b

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

app/Exceptions/Handler.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Symfony\Component\HttpKernel\Exception\HttpException;
1616
use Pterodactyl\Exceptions\Repository\RecordNotFoundException;
1717
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
18-
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
1918

2019
class Handler extends ExceptionHandler
2120
{
@@ -154,26 +153,6 @@ public function render($request, Exception $exception)
154153
$connections->rollBack(0);
155154
}
156155

157-
// Because of some breaking change snuck into a Laravel update that didn't get caught
158-
// by any of the tests, exceptions implementing the HttpExceptionInterface get marked
159-
// as being HttpExceptions, but aren't actually implementing the HttpException abstract.
160-
//
161-
// This is incredibly annoying because we can't just temporarily override the handler to
162-
// allow these (at least without taking on a high maintenance cost). Laravel 5.8 fixes this,
163-
// so when we update (or have updated) this code can be removed.
164-
//
165-
// @see https://github.com/laravel/framework/pull/25975
166-
// @todo remove this code when upgrading to Laravel 5.8
167-
if ($exception instanceof HttpExceptionInterface && ! $exception instanceof HttpException) {
168-
$exception = new HttpException(
169-
$exception->getStatusCode(),
170-
$exception->getMessage(),
171-
$exception,
172-
$exception->getHeaders(),
173-
$exception->getCode()
174-
);
175-
}
176-
177156
return parent::render($request, $exception);
178157
}
179158

0 commit comments

Comments
 (0)