diff --git a/htdocs/ticket/class/api_tickets.class.php b/htdocs/ticket/class/api_tickets.class.php index c95b092cf2e67..707fe403c6c26 100644 --- a/htdocs/ticket/class/api_tickets.class.php +++ b/htdocs/ticket/class/api_tickets.class.php @@ -291,6 +291,7 @@ public function index($socid = 0, $sortfield = "t.rowid", $sortorder = "ASC", $l $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); + $i = 0; while ($i < $num) { $obj = $db->fetch_object($result); $ticket_static = new Ticket($db);