From 42df4e89ff9139ab62be11476345222764938c35 Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Wed, 5 Mar 2014 20:38:17 +0000 Subject: [PATCH] Support viewing tickets without a departments This can happen when associated department is private and the system has no default department (which is possible with v1.6 upgrade) --- include/client/view.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/client/view.inc.php b/include/client/view.inc.php index a369ee75d..469740f6c 100644 --- a/include/client/view.inc.php +++ b/include/client/view.inc.php @@ -31,7 +31,7 @@ if(!$dept || !$dept->isPublic()) </tr> <tr> <th>Department:</th> - <td><?php echo Format::htmlchars($dept->getName()); ?></td> + <td><?php echo Format::htmlchars($dept instanceof Dept ? $dept->getName() : ''); ?></td> </tr> <tr> <th>Create Date:</th> -- GitLab