Commit b4dfbe51 authored by okhin's avatar okhin 🚴

Merge branch '80-pages-d-erreur-blanche' into 'preprod'

Resolve "Pages d'erreur blanche"

Closes #80

See merge request !81
parents 37b6d473 74334331
Pipeline #2315 passed with stages
in 12 seconds
...@@ -42,6 +42,14 @@ $f3->set('ONERROR', function ($f3) { ...@@ -42,6 +42,14 @@ $f3->set('ONERROR', function ($f3) {
// If there is any problem, replace the current csrf // If there is any problem, replace the current csrf
$csrf = md5(rand()); $csrf = md5(rand());
$f3->CSRF = $csrf; $f3->CSRF = $csrf;
// If neither error or message are set, define them
if (!$f3->exists('SESSION.message')) {
$f3->push('SESSION.message', '');
}
if (!$f3->exists('SESSION.error')) {
$f3->push('SESSION.error', '');
}
$f3->get('container')['session']->set('csrf', $csrf); $f3->get('container')['session']->set('csrf', $csrf);
while (ob_get_level()) { while (ob_get_level()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment