mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-18 20:13:26 +02: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:
@@ -21,7 +21,7 @@ if ($view !== false) {
|
||||
}
|
||||
$ticketData = mysql_select_single("SELECT * FROM znote_tickets WHERE id='$view' LIMIT 1;");
|
||||
|
||||
if($ticketData['owner'] != $session_user_id) {
|
||||
if(!$ticketData || $ticketData['owner'] != $session_user_id) {
|
||||
echo 'You can not view this ticket!';
|
||||
include 'layout/overall/footer.php';
|
||||
die;
|
||||
|
Reference in New Issue
Block a user