Skip to content
Extraits de code Groupes Projets
Valider 34c33743 rédigé par Okhin's avatar Okhin
Parcourir les fichiers

Testing and setting SESSION.error and SESSION.message if they're not defined

parent 37b6d473
Branches
Étiquettes
2 requêtes de fusion!83Preprod,!81Resolve "Pages d'erreur blanche"
......@@ -42,6 +42,12 @@ $f3->set('ONERROR', function ($f3) {
// If there is any problem, replace the current csrf
$csrf = md5(rand());
$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);
while (ob_get_level()) {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter