From c7170011f048bea730dfc623d03ef94d787f501e Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Tue, 20 Jan 2015 23:40:43 +0000 Subject: [PATCH] oops: bug fix --- include/class.ticket.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/class.ticket.php b/include/class.ticket.php index 07c8bfebd..3b4597dfb 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -536,11 +536,10 @@ class Ticket { // fallback if the logic in ::setStatus fails. function setStatusId($id) { $sql = 'UPDATE '.TICKET_TABLE.' SET updated=NOW() '. - ' ,status_id='.db_input($status->getId()) . + ' ,status_id='.db_input($id) . ' WHERE ticket_id='.db_input($this->getId()); - if (!db_query($sql) || !db_affected_rows()) - return false; + return (db_query($sql) && db_affected_rows()); } function getStatus() { -- GitLab