mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-12-13 23:49:47 +01:00
Fix error in helpdesk.php (#516)
Error: Warning: Trying to access array offset on value of type bool in C:....\helpdesk.php on line 34 If I put a non-existent ID in the URL, it throws the error.
This commit is contained in:
@@ -36,6 +36,11 @@ if ($view !== false){
|
||||
}
|
||||
|
||||
$ticketData = mysql_select_single("SELECT * FROM znote_tickets WHERE id='$view' LIMIT 1;");
|
||||
if(!$ticketData) {
|
||||
echo 'You can not view this ticket!';
|
||||
include 'layout/overall/footer.php';
|
||||
die;
|
||||
}
|
||||
?>
|
||||
<h1>View Ticket #<?php echo $ticketData['id']; ?></h1>
|
||||
<table class="znoteTable ThreadTable table table-striped">
|
||||
@@ -144,4 +149,4 @@ if ($view !== false){
|
||||
} else echo 'No helpdesk tickets has been submitted.';
|
||||
}
|
||||
include 'layout/overall/footer.php';
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user