mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 23:31:21 +02:00
fix: validation error messages hidden by generic fallback in ErrorHandler::userMessage
ErrorHandler::userMessage only handled RuntimeException, but all validation throws in ThesisCreateController and ThesisEditController use plain Exception. This caused user-friendly messages like 'Le champ Nom/Prénom/Pseudo est requis' to fall through to the 'Une erreur inattendue est survenue…' generic message. Fix: add Exception check (after PDOException, since PDOException extends it) so all validation exceptions pass their message through.
This commit is contained in:
@@ -171,7 +171,7 @@ class ThesisEditController
|
||||
$errors = [];
|
||||
$titre = trim($post['titre'] ?? '');
|
||||
if ($titre === '') {
|
||||
$errors[] = 'Le titre est requis.';
|
||||
$errors[] = 'Le titre du TFE est requis.';
|
||||
}
|
||||
$auteurice = trim($post['auteurice'] ?? '');
|
||||
if ($auteurice === '') {
|
||||
|
||||
Reference in New Issue
Block a user