From 2490fc04b379c925ca42782f416ceadc245cab7d Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Mon, 31 Mar 2014 15:40:59 -0500
Subject: [PATCH] Fix oops scrubbing stripped attachments

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

diff --git a/include/class.thread.php b/include/class.thread.php
index 35bd5a284..fbe50bc87 100644
--- a/include/class.thread.php
+++ b/include/class.thread.php
@@ -973,7 +973,7 @@ Class ThreadEntry {
                 foreach ($vars['attachments'] as $i=>$a) {
                     if (@$a['cid'] && $a['cid'] == $cid) {
                         // Inline referenced attachment was stripped
-                        unset($vars['attachments']);
+                        unset($vars['attachments'][$i]);
                     }
                 }
             }
-- 
GitLab