mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 18:44:16 +00:00
Fix missing import.
This commit is contained in:
@@ -44,6 +44,9 @@ use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
|||||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||||
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
|
use function \Safe\date;
|
||||||
|
use function \Safe\json_encode;
|
||||||
|
use function \Safe\parse_url;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Handler
|
* Class Handler
|
||||||
@@ -227,7 +230,7 @@ class Handler extends ExceptionHandler
|
|||||||
$data = [
|
$data = [
|
||||||
'class' => $e::class,
|
'class' => $e::class,
|
||||||
'errorMessage' => $e->getMessage(),
|
'errorMessage' => $e->getMessage(),
|
||||||
'time' => \Safe\date('r'),
|
'time' => date('r'),
|
||||||
'stackTrace' => $e->getTraceAsString(),
|
'stackTrace' => $e->getTraceAsString(),
|
||||||
'file' => $e->getFile(),
|
'file' => $e->getFile(),
|
||||||
'line' => $e->getLine(),
|
'line' => $e->getLine(),
|
||||||
@@ -238,7 +241,7 @@ class Handler extends ExceptionHandler
|
|||||||
'json' => request()->acceptsJson(),
|
'json' => request()->acceptsJson(),
|
||||||
'method' => request()->method(),
|
'method' => request()->method(),
|
||||||
'headers' => $headers,
|
'headers' => $headers,
|
||||||
'post' => 'POST' === request()->method() ? \Safe\json_encode(request()->all()) : '',
|
'post' => 'POST' === request()->method() ? json_encode(request()->all()) : '',
|
||||||
];
|
];
|
||||||
|
|
||||||
// create job that will mail.
|
// create job that will mail.
|
||||||
@@ -285,8 +288,8 @@ class Handler extends ExceptionHandler
|
|||||||
}
|
}
|
||||||
$safe = route('index');
|
$safe = route('index');
|
||||||
$previous = $exception->redirectTo;
|
$previous = $exception->redirectTo;
|
||||||
$previousHost = \Safe\parse_url($previous, PHP_URL_HOST);
|
$previousHost = parse_url($previous, PHP_URL_HOST);
|
||||||
$safeHost = \Safe\parse_url($safe, PHP_URL_HOST);
|
$safeHost = parse_url($safe, PHP_URL_HOST);
|
||||||
|
|
||||||
return null !== $previousHost && $previousHost === $safeHost ? $previous : $safe;
|
return null !== $previousHost && $previousHost === $safeHost ? $previous : $safe;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user