From f32bd57e53a1a372e6d1ee55a2c1f39006e2f023 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Sat, 22 Mar 2014 18:15:55 -0500 Subject: [PATCH] Fix possible crash if no content for login banner --- include/staff/login.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/staff/login.tpl.php b/include/staff/login.tpl.php index 4a1d2f727..c0cbbb5b7 100644 --- a/include/staff/login.tpl.php +++ b/include/staff/login.tpl.php @@ -5,7 +5,7 @@ $info = ($_POST && $errors)?Format::htmlchars($_POST):array(); <div id="loginBox"> <h1 id="logo"><a href="index.php">osTicket Staff Control Panel</a></h1> <h3><?php echo Format::htmlchars($msg); ?></h3> - <div><?php echo Format::viewableImages($content->getBody()); ?></div> + <div><small><?php echo ($content) ? Format::viewableImages($content->getBody()) : ''; ?></small></div> <form action="login.php" method="post"> <?php csrf_token(); ?> <input type="hidden" name="do" value="scplogin"> -- GitLab