Browse code

Allows calling system_failure early where no role is set

Hanno Böck authored on02/05/2020 12:03:00
Showing1 changed files
... ...
@@ -18,6 +18,9 @@ require_once("inc/security.php");
18 18
 
19 19
 function system_failure($reason)
20 20
 {
21
+    if (!isset($_SESSION['role'])) {
22
+        $_SESSION['role'] = ROLE_ANONYMOUS;
23
+    }
21 24
     input_error($reason);
22 25
     show_page();
23 26
     die();