Skip to content
Snippets Groups Projects
Commit f376cd8b authored by Jared Hancock's avatar Jared Hancock
Browse files

Ignore case for ticket variables on custom fields

parent c55ca507
Branches
Tags
No related merge requests found
...@@ -105,8 +105,8 @@ class Ticket { ...@@ -105,8 +105,8 @@ class Ticket {
if (!$this->_answers) { if (!$this->_answers) {
foreach (DynamicFormEntry::forTicket($this->getId(), true) as $form) foreach (DynamicFormEntry::forTicket($this->getId(), true) as $form)
foreach ($form->getAnswers() as $answer) foreach ($form->getAnswers() as $answer)
$this->_answers[$answer->getField()->get('name')] if ($tag = mb_strtolower($answer->getField()->get('name')))
= $answer; $this->_answers[$tag] = $answer;
} }
} }
...@@ -1097,6 +1097,7 @@ class Ticket { ...@@ -1097,6 +1097,7 @@ class Ticket {
return $this->getOwner(); return $this->getOwner();
break; break;
default: default:
$tag = mb_strtolower($tag);
if (isset($this->_answers[$tag])) if (isset($this->_answers[$tag]))
// The answer object is retrieved here which will // The answer object is retrieved here which will
// automatically invoke the toString() method when the // automatically invoke the toString() method when the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment