-
Notifications
You must be signed in to change notification settings - Fork 0
🚀 Production Release: test → prod #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ed16ff3
f2b7a2f
eb3be36
43740f8
91a3838
73fe369
c25c646
5f75e04
b861c9a
939f4f3
161561d
9a1d976
135f25b
c66aa53
2f90d4b
ddab364
d36fa28
2964705
e127d25
4021746
4675474
bf62f46
188fe5f
d554131
be54ce9
98ccfc5
d6fbe9d
8e584cd
23720b1
f86c137
b1ca139
ee1e077
a09ee7f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -23,6 +23,12 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!headers_sent()) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| http_response_code(500); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $uri = $_SERVER['REQUEST_URI'] ?? ''; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (strpos($uri, '/api/') !== false) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| header('Content-Type: application/json; charset=utf-8'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo json_encode(['success' => false, 'message' => 'Erreur fatale du serveur'], JSON_UNESCAPED_UNICODE); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $uri = $_SERVER['REQUEST_URI'] ?? ''; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -98,6 +104,33 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo '<h1>Erreur interne du serveur</h1><p>Une erreur est survenue. Veuillez réessayer.</p>'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $uri = $_SERVER['REQUEST_URI'] ?? ''; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (strpos($uri, '/api/') !== false) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!headers_sent()) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| http_response_code(500); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| header('Content-Type: application/json; charset=utf-8'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $env = defined('APP_ENV') ? APP_ENV : (\Core\Config\EnvLoader::get('APP_ENV', 'production')); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $payload = ['success' => false, 'message' => 'Erreur interne du serveur']; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if ($env === 'development') { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $payload['message'] = get_class($e) . ': ' . $msg; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $payload['file'] = $file . ':' . $line; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $payload['trace'] = $e->getTraceAsString(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo json_encode($payload, JSON_UNESCAPED_UNICODE); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!headers_sent()) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| http_response_code(500); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| header('Content-Type: text/html; charset=utf-8'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // TOUJOURS afficher les détails pour le debug | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo '<h1>Erreur 500 – Exception non gérée</h1>'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo '<p><b>' . htmlspecialchars(get_class($e)) . ':</b> ' . htmlspecialchars($msg) . '</p>'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo '<p>dans <b>' . htmlspecialchars($file) . '</b> ligne <b>' . $line . '</b></p>'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo '<pre>' . htmlspecialchars($e->getTraceAsString()) . '</pre>'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+124
to
+133
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!headers_sent()) { | |
| http_response_code(500); | |
| header('Content-Type: text/html; charset=utf-8'); | |
| } | |
| // TOUJOURS afficher les détails pour le debug | |
| echo '<h1>Erreur 500 – Exception non gérée</h1>'; | |
| echo '<p><b>' . htmlspecialchars(get_class($e)) . ':</b> ' . htmlspecialchars($msg) . '</p>'; | |
| echo '<p>dans <b>' . htmlspecialchars($file) . '</b> ligne <b>' . $line . '</b></p>'; | |
| echo '<pre>' . htmlspecialchars($e->getTraceAsString()) . '</pre>'; | |
| if (!isset($env)) { | |
| $env = defined('APP_ENV') ? APP_ENV : (\Core\Config\EnvLoader::get('APP_ENV', 'production')); | |
| } | |
| if (!headers_sent()) { | |
| http_response_code(500); | |
| header('Content-Type: text/html; charset=utf-8'); | |
| } | |
| if ($env === 'development') { | |
| // Afficher les détails uniquement en environnement de développement | |
| echo '<h1>Erreur 500 – Exception non gérée</h1>'; | |
| echo '<p><b>' . htmlspecialchars(get_class($e)) . ':</b> ' . htmlspecialchars($msg) . '</p>'; | |
| echo '<p>dans <b>' . htmlspecialchars($file) . '</b> ligne <b>' . $line . '</b></p>'; | |
| echo '<pre>' . htmlspecialchars($e->getTraceAsString()) . '</pre>'; | |
| } else { | |
| // En production, ne pas divulguer de détails techniques supplémentaires ici | |
| if (!headers_sent()) { | |
| echo '<h1>Erreur interne du serveur</h1><p>Une erreur est survenue. Veuillez réessayer.</p>'; | |
| } | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Le lien « IA » est ajouté dans la nav desktop, mais il n’est pas présent dans le menu burger (mobile). Pour éviter une navigation incohérente selon la taille d’écran, ajouter aussi l’entrée « IA » dans la liste du menu burger.