aboutsummaryrefslogtreecommitdiff
path: root/src/controller/ContactFormController.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2026-07-26 14:30:36 +0200
committerpolo <ordipolo@gmx.fr>2026-07-26 14:30:36 +0200
commit16b0a3d5fbc78837014385652a5c58b5a6c5d937 (patch)
treeb049ba5845722fc7fa3d2705ced127f10212d025 /src/controller/ContactFormController.php
parent2c89c0ec184c0ed76562c899722bb3615cd83add (diff)
downloadcms-main.tar.gz
cms-main.tar.bz2
cms-main.zip
erreurs retournées, retour immédiat en cas d'erreurHEADmain
Diffstat (limited to 'src/controller/ContactFormController.php')
-rw-r--r--src/controller/ContactFormController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controller/ContactFormController.php b/src/controller/ContactFormController.php
index e078af2..82e9b17 100644
--- a/src/controller/ContactFormController.php
+++ b/src/controller/ContactFormController.php
@@ -38,7 +38,7 @@ class ContactFormController
38 return new JsonResponse(['success' => true]); 38 return new JsonResponse(['success' => true]);
39 } 39 }
40 else{ 40 else{
41 return new JsonResponse(['success' => false, 'error' => $form->getErrors()[0]]); // la 1ère erreur sera affichée 41 return new JsonResponse(['success' => false, 'error' => $form->getError()]);
42 } 42 }
43 } 43 }
44 44
@@ -60,7 +60,7 @@ class ContactFormController
60 } 60 }
61 } 61 }
62 else{ 62 else{
63 $error = $form->getErrors()[0]; // la 1ère erreur sera affichée 63 $error = $form->getError();
64 } 64 }
65 65
66 if(empty($error)){ 66 if(empty($error)){