Hi.
We have ticket category which can receive incoming tickets via a help topic form or via email.
In the help topic form, there is a field called "item" which describes the item name.
When the ticket is received via email, this field is obviously empty, but thats fine.
The probelm is: we have a message template that sends a confirmation message to the user when the ticket is closed.
If an agent tries to close a ticket from this category and the ticket has been opened by email, the agent gets a blank page with error 500.
Seems like osticket is crashing when it tries to parse an empty variable.
Here is our message template:

Here is the server log:
`
172.20.12.26 - - [13/Apr/2023:19:40:58 +0000] "POST /scp/ajax.php/lock/ticket/1184 HTTP/1.1" 200 365 "https://osticket.mydomain.com/scp/tickets.php?id=1184" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
[Thu Apr 13 19:41:07.254350 2023] [php:error] [pid 46] [client 172.20.12.26:51823] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Ticket::getLink(), 0 passed in /var/www/html/include/class.variable.php on line 95 and exactly 1 expected in /var/www/html/include/class.ticket.php:4754\nStack trace:\n#0 /var/www/html/include/class.variable.php(95): Ticket::getLink()\n#1 /var/www/html/include/class.variable.php(134): VariableReplacer->getVar()\n#2 /var/www/html/include/class.variable.php(168): VariableReplacer->resolveVar()\n#3 /var/www/html/include/class.variable.php(115): VariableReplacer->parse()\n#4 [internal function]: VariableReplacer->replaceVars()\n#5 /var/www/html/include/class.variable.php(113): array_map()\n#6 /var/www/html/include/class.osticket.php(147): VariableReplacer->replaceVars()\n#7 /var/www/html/include/class.ticket.php(2416): osTicket->replaceTemplateVariables()\n#8 /var/www/html/include/class.ticket.php(3447): Ticket->replaceVars()\n#9 /var/www/html/scp/tickets.php(220): Ticket->postReply()\n#10 {main}\n thrown in /var/www/html/include/class.ticket.php on line 4754, referer: https://osticket.mydomain.com/scp/tickets.php?id=1184
172.20.12.26 - - [13/Apr/2023:19:41:07 +0000] "POST /scp/tickets.php?id=1184 HTTP/1.1" 500 321 "https://osticket.mydomain.com/scp/tickets.php?id=1184" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
`%
Server info:

*