From 6193d82554689989261abcbda70da845dbab17b2 Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@osticket.com>
Date: Thu, 6 Aug 2015 15:02:35 +0000
Subject: [PATCH] bug: Init $options

SendAlert expects an array as options param.
---
 include/class.ticket.php | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/include/class.ticket.php b/include/class.ticket.php
index fa4024056..9c0181fcd 100644
--- a/include/class.ticket.php
+++ b/include/class.ticket.php
@@ -1931,8 +1931,9 @@ implements RestrictedAccess, Threadable {
         $this->logEvent('transferred');
 
         // Post internal note if any
-        $note = $form->getField('comments')->getClean();
-        if ($note) {
+        $note = null;
+        $comments = $form->getField('comments')->getClean();
+        if ($comments) {
             $title = sprintf(__('%1$s transferred from %2$s to %3$s'),
                     __('Ticket'),
                    $cdept->getName(),
@@ -1940,7 +1941,7 @@ implements RestrictedAccess, Threadable {
 
             $_errors = array();
             $note = $this->postNote(
-                    array('note' => $note, 'title' => $title),
+                    array('note' => $comments, 'title' => $title),
                     $_errors, $thisstaff, false);
         }
 
@@ -1980,7 +1981,7 @@ implements RestrictedAccess, Threadable {
             ) {
                 $recipients[] = $manager;
             }
-            $sentlist = array();
+            $sentlist = $options = array();
             if ($note) {
                 $options += array(
                     'inreplyto'=>$note->getEmailMessageId(),
-- 
GitLab