Skip to content

Commit

Permalink
Merge pull request #1620 from Cedric-Thomas/patch-1
Browse files Browse the repository at this point in the history
Fix header.php Error 500 on logout
  • Loading branch information
charleneauger authored Sep 9, 2024
2 parents cfa02de + beb4be0 commit 6382ba4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions require/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,15 @@
$sql = "SHOW COLUMNS FROM `%s`";
$arg = $item[0];
$res_column = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"], $arg);
while ($item_column = mysqli_fetch_row($res_column)) {

if ($item_column[0] == "HARDWARE_ID" && !isset($_SESSION['OCS']['SQL_TABLE_HARDWARE_ID'][$item[0]])) {
$_SESSION['OCS']['SQL_TABLE_HARDWARE_ID'][$item[0]] = $item[0];
if ($res_column !== false) {
while ($item_column = mysqli_fetch_row($res_column)) {

if ($item_column[0] == "HARDWARE_ID" && !isset($_SESSION['OCS']['SQL_TABLE_HARDWARE_ID'][$item[0]])) {
$_SESSION['OCS']['SQL_TABLE_HARDWARE_ID'][$item[0]] = $item[0];
}

$_SESSION['OCS']['SQL_TABLE'][$item[0]][$item_column[0]] = $item_column[0];
}

$_SESSION['OCS']['SQL_TABLE'][$item[0]][$item_column[0]] = $item_column[0];
}
}
}
Expand Down

0 comments on commit 6382ba4

Please sign in to comment.