fix php8 error in user.php

This commit is contained in:
Steffen Müller 2024-04-10 15:47:54 +02:00
parent ee37419582
commit f942c4905e
No known key found for this signature in database
GPG Key ID: 4BDF257D564FDEC0
2 changed files with 8 additions and 1 deletions

View File

@ -47,7 +47,7 @@ Template::render_header(_("User"), true);
?>
<div class="text-center">
<h1><?php
if ($_SESSION['user'] == $_GET['id'])
if (isset($_GET['id']) && isset($_SESSION['user']) && $_SESSION['user'] == $_GET['id'])
{
echo _("User settings");
}else{

View File

@ -1,4 +1,11 @@
<?php
// enable this for debugging
// error_reporting(E_ALL);
// ini_set('display_startup_errors', 1);
// ini_set('display_errors', 1);
// ini_set("log_errors", 1);
$statuses = array(_("Major outage"), _("Minor outage"), _("Planned maintenance"), _("Operational") );
$classes = array("danger", "warning", "primary", "success" );
$icons = array("fa fa-times", "fa fa-exclamation", "fa fa-info", "fa fa-check" );