From 60e4129b8bc21ff4bfe6099b0e439ca6005b0d03 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Thu, 21 Nov 2013 17:29:07 -0600
Subject: [PATCH] oops: Ensure response actually exists for template

---
 include/class.ticket.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/class.ticket.php b/include/class.ticket.php
index 279d7e4e4..13fea02f0 100644
--- a/include/class.ticket.php
+++ b/include/class.ticket.php
@@ -2230,7 +2230,7 @@ class Ticket {
             $msg = $ticket->replaceVars($msg->asArray(), array(
                 'message' => $message,
                 'signature' => $signature,
-                'response' => $response->getBody(),
+                'response' => ($response) ? $response->getBody() : '',
             ));
 
             if($cfg->stripQuotedReply() && ($tag=trim($cfg->getReplySeparator())))
-- 
GitLab