Fix: email clearing in findOrCreateAuthor, htmlspecialchars(null) crash in old(), dead contact_interne field, access_type_id radio clearing

- findOrCreateAuthor: always update email column (pass null when empty/falsy) so clearing an email actually persists
- admin/add.php & admin/edit.php old(): add null guard before htmlspecialchars, cast to string
- jury-fieldset.php: guard against old() returning array for scalar-checked jury_lecteur keys
- formulaire.php: only suppress display_errors in production (not cli-server dev mode)
- Removed dead contact_interne field from backoffice form (no DB column, never saved)
- Removed dead contactInterne validation from ThesisCreateController
- Added "— Non défini" radio option for access_type_id in admin mode for clearing
- Fixed strict int-vs-string comparison breaking radio button checked detection
This commit is contained in:
Pontoporeia
2026-05-10 02:55:47 +02:00
parent 6cc0e407f3
commit 8a4b2541fb
10 changed files with 58 additions and 42 deletions

View File

@@ -69,3 +69,11 @@
- [x] Mots-clés: interactive tag search with HTMX suggestions, pill display, round bin-icon remove buttons
- [x] Mots-clés: lowercase enforcement, deduplication, absolute dropdown, keyboard arrows/enter/escape, blur hide, spacing + counter above input, CSV import lowercased, space-collapse normalization, minimum 3 keywords required
- [x] ErrorHandler: shared static helper for structured error_log + user-friendly messages with precise FK field extraction from SQLite errors. Applied to 12 action files + 6 public controllers + 2 form controllers + partage. Covers FK, UNIQUE, NOT NULL constraint types.
- [x] Fix: findOrCreateAuthor cannot clear email (empty string skips update, leaves old email)
- [ ] Fix: "NON" stored as literal email string in authors table (CSV import or old data)
- [x] Fix: contact_interne field in edit form never saved — removed dead field from form and dead validation from create controller
- [x] Fix: formulaire.php unconditionally suppresses display_errors even in dev mode
- [x] Fix: access_type_id radio has no "none" option — added "— Non défini" radio for admin mode
- [x] Fix: radio button checked detection broken (int vs string strict comparison in fieldset-licence-explanation.php)
- [x] Fix: htmlspecialchars(null) crash in old() on admin/add.php and admin/edit.php (null values in form data)
- [x] Fix: jury-fieldset.php old() return type confusion (array vs string) for jury_lecteur:_interne:_externe keys