From e483952ea5ab85e97a9bdcf646bf372cb81b5035 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Sat, 10 Aug 2013 20:42:18 +0000 Subject: [PATCH] Fix compiler errors and uninitialized vars --- include/class.staff.php | 7 ++++--- include/client/view.inc.php | 2 +- include/staff/ticket-view.inc.php | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/class.staff.php b/include/class.staff.php index 424b273e5..66b5422a6 100644 --- a/include/class.staff.php +++ b/include/class.staff.php @@ -712,14 +712,15 @@ class Staff { $ost->getConfig()->getBaseUrl(), $token), ); + + if(!($email=$cfg->getAlertEmail())) + $email = $cfg->getDefaultEmail(); + $info = array('email' => $email, 'vars' => &$vars); Signal::send('auth.pwreset.email', $this, $info); $msg = $ost->replaceTemplateVariables($template->asArray(), $vars); - if(!($email=$cfg->getAlertEmail())) - $email =$cfg->getDefaultEmail(); - $_config = new Config('pwreset'); $_config->set($vars['token'], $this->getId()); diff --git a/include/client/view.inc.php b/include/client/view.inc.php index 782653f7a..f6bac8840 100644 --- a/include/client/view.inc.php +++ b/include/client/view.inc.php @@ -62,7 +62,7 @@ if(!$dept || !$dept->isPublic()) if($ticket->getThreadCount() && ($thread=$ticket->getClientThread())) { $threadType=array('M' => 'message', 'R' => 'response'); foreach($thread as $entry) { - if($entry['body'], '-') + if ($entry['body'] == '-') $entry['body'] = '(EMPTY)'; //Making sure internal notes are not displayed due to backend MISTAKES! diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php index 9d5cc3a70..0d77e6108 100644 --- a/include/staff/ticket-view.inc.php +++ b/include/staff/ticket-view.inc.php @@ -332,7 +332,7 @@ if(!$cfg->showNotesInline()) { ?> $types[] = 'N'; if(($thread=$ticket->getThreadEntries($types))) { foreach($thread as $entry) { - if($entry['body'], '-') + if ($entry['body'] == '-') $entry['body'] = '(EMPTY)'; ?> <table class="<?php echo $threadTypes[$entry['thread_type']]; ?>" cellspacing="0" cellpadding="1" width="940" border="0"> -- GitLab