From 602eeb49eb2031d7ee772427cac036d2aff98568 Mon Sep 17 00:00:00 2001 From: Jan-Marlon Leibl Date: Fri, 3 Nov 2023 21:43:16 +0100 Subject: [PATCH] Replace qualifier with import --- src/Controller/File/UploadController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Controller/File/UploadController.php b/src/Controller/File/UploadController.php index 0888ba1..05402c5 100755 --- a/src/Controller/File/UploadController.php +++ b/src/Controller/File/UploadController.php @@ -7,6 +7,7 @@ use App\Entity\User; use App\Repository\UserRepository; use DateTimeImmutable; use Doctrine\ORM\EntityManagerInterface; +use Exception; use RuntimeException; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\File\UploadedFile; @@ -59,7 +60,7 @@ class UploadController extends AbstractController $fileUrl = $this->generateFileUrl($newFilename); return new Response($fileUrl, Response::HTTP_CREATED); - } catch (\Exception $exception) { + } catch (Exception $exception) { return new JsonResponse(['error' => $exception->getMessage()], Response::HTTP_BAD_REQUEST); } }