diff --git a/www/index.php b/www/index.php index 6e6bf50ced64b0c787d300e6b1f81fc0f9f35a9e..3ad2db40981b6c6cf9705e577aff7f8c351e5f6b 100644 --- a/www/index.php +++ b/www/index.php @@ -42,6 +42,14 @@ $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()) {