What did you do to cause this?
Steps to reproduce:
What page were you on?
http://path.to.traq/myproject/tickets/new
What PHP and MySQL versions do you run?
PHP version 5.3.23, MySQL version 5.5.27-cll
Describe the defect:
The $project->next_tid
increments twice: one time at the first submit and other time after the correction of the error.
Possible solution: to check for errors before making the $next_tid++ and if there are any, don't increment it.