Browse Source

Correctif detection erreur

develop
Fabien Normand 2 years ago
parent
commit
67e6f37407
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      EventListener/ExceptionListener.php

+ 5
- 3
EventListener/ExceptionListener.php View File

@@ -22,9 +22,11 @@ class ExceptionListener

// On détecte une erreur interne (500), on remove les sessions qui servent de filtre dans l'admin
if ($exception instanceof HttpExceptionInterface != true) {
foreach ($this->session->all() as $key => $s) {
if (str_contains($key, "_filter")) {
$this->session->remove($key);
if (!headers_sent()) {
foreach ($this->session->all() as $key => $s) {
if (str_contains($key, "_filter")) {
$this->session->remove($key);
}
}
}
}

Loading…
Cancel
Save