Hi,
I found na little bug in my brand new installation of osTicket 1.15.2p1...
I currently implementing OST and wanted to send replys to Ticket-creators which send via mail.
the system is running on xampp on Windows Server as Service. I created a planned task for the cron.php which collects the mails from the helpdesk mailbox.
I saw the error in the commandline when running the cron manually:
PHP Fatal error: Uncaught Error: Call to a member function getFullName() on null in C:\xampp\htdocs\osTicket\include\class.ticket.php:2244
Stack trace:
#0 C:\xampp\htdocs\osTicket\include\class.variable.php(89): Ticket->getVar('topic', Object(VariableReplacer))
#1 C:\xampp\htdocs\osTicket\include\class.variable.php(134): VariableReplacer->getVar(Object(Ticket), 'topic.name')
#2 C:\xampp\htdocs\osTicket\include\class.variable.php(168): VariableReplacer->_resolveVar('ticket.topic.na...')
#3 C:\xampp\htdocs\osTicket\include\class.variable.php(115): VariableReplacer->_parse('<h3><strong>Hal...')
#4 [internal function]: VariableReplacer->replaceVars('<h3><strong>Hal...')
#5 C:\xampp\htdocs\osTicket\include\class.variable.php(113): array_map(Array, Array)
#6 C:\xampp\htdocs\osTicket\include\class.osticket.php(147): VariableReplacer->replaceVars(Array)
#7 C:\xampp\htdocs\osTicket\include\class.ticket.php(2458): osTicket->replaceTemplateVariables(Array, Array)
#8 C:\xampp\htdocs\osTicket\include\class.ticket.php(1700): Ticket->replac in C:\xampp\htdocs\osTicket\include\class.ticket.php on line 2244
and i found out under which circumstances this happens:
- In the default Template under at the ""new Ticket reply" there is the help-topic with the var "%{ticket.topic.name}"
- Select an Email-Template under "emailsettings.php"
- No "Help-Topic" selected under the e-Mail-adress Settings (here was only "--- select help topic ---" listet). I could save this formular without selecting something from the list.
I could solve the issue by deleting the variable from the Template or by selecting an helptopic in the Mail Settings. after this the scripts doesn't throw these errors and the mail-reply for the new ticket lands in my inbox.
perhaps there could be implement a check for this to avoid the break of the cron script. It took me about 2hrs to find the issue.
With regards
Christian