diff --git a/customer_tickets.php b/customer_tickets.php index d237ac06..5262adb5 100644 --- a/customer_tickets.php +++ b/customer_tickets.php @@ -250,6 +250,11 @@ if ($page == 'overview') { if ($replyticket->Get('message') == null) { standard_error(array('stringisempty', 'mymessage')); } else { + try { + $mainticket = ticket::getInstanceOf($userinfo, (int)$id); + } catch(Exception $e) { + standard_error($e->getMessage()); + } $now = time(); $replyticket->Set('customer', (int)$userinfo['customerid'], true, true); $replyticket->Set('lastchange', $now, true, true); @@ -260,8 +265,6 @@ if ($page == 'overview') { $replyticket->Insert(); // Update priority if changed - $mainticket = ticket::getInstanceOf($userinfo, (int)$id); - if ($replyticket->Get('priority') != $mainticket->Get('priority')) { $mainticket->Set('priority', $replyticket->Get('priority'), true); } diff --git a/lib/classes/ticket/class.ticket.php b/lib/classes/ticket/class.ticket.php index 4fb06eb4..b3b14384 100644 --- a/lib/classes/ticket/class.ticket.php +++ b/lib/classes/ticket/class.ticket.php @@ -46,7 +46,7 @@ class ticket /** * Ticket-Object-Array * - * @var ticket + * @var ticket[] */ private static $tickets = array();