From f376cd8b526acd37767dedfd3a7a83ce731ae3e8 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Thu, 6 Feb 2014 17:16:04 -0600
Subject: [PATCH] Ignore case for ticket variables on custom fields

---
 include/class.ticket.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/class.ticket.php b/include/class.ticket.php
index 76445c867..28d00e0d0 100644
--- a/include/class.ticket.php
+++ b/include/class.ticket.php
@@ -105,8 +105,8 @@ class Ticket {
         if (!$this->_answers) {
             foreach (DynamicFormEntry::forTicket($this->getId(), true) as $form)
                 foreach ($form->getAnswers() as $answer)
-                    $this->_answers[$answer->getField()->get('name')]
-                        = $answer;
+                    if ($tag = mb_strtolower($answer->getField()->get('name')))
+                        $this->_answers[$tag] = $answer;
         }
     }
 
@@ -1097,6 +1097,7 @@ class Ticket {
                 return $this->getOwner();
                 break;
             default:
+                $tag = mb_strtolower($tag);
                 if (isset($this->_answers[$tag]))
                     // The answer object is retrieved here which will
                     // automatically invoke the toString() method when the
-- 
GitLab