Unfortunately, this fix introduced another error:
Now i can't create or open any tickets. To be exact: when I try to create a ticket from gui, error page appears on submit, but is created. Tickets that 'arrive' via email are created without any errors. Both tickets cannot be opened, until the original file is restored instead the modified one.