CreateTicketLinks: Variable `$ticket` is always set, but can be emtpy

This commit is contained in:
Sukhwinder Dhillon 2023-08-15 15:37:08 +02:00 committed by raviks789
parent 4d3765b22f
commit 01b93024f6
1 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ class Zend_View_Helper_CreateTicketLinks extends Zend_View_Helper_Abstract
public function createTicketLinks($text)
{
$tickets = $this->view->tickets;
/** @var \Icinga\Application\Hook\TicketHook $tickets */
return isset($tickets) ? $tickets->createLinks($text) : $text;
/** @var \Icinga\Application\Hook\TicketHook|array|null $tickets */
return ! empty($tickets) ? $tickets->createLinks($text) : $text;
}
}