From 03bdd6945a6636f67dc3aa7e1d8ddb1b8174bdf4 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Tue, 10 Dec 2013 13:20:28 -0600
Subject: [PATCH] forms: Clearing answers cache should be null

The check in DynamicFormEntry::getAnswers() will use the cached _values
array if it is not set to null. Previously, the ::save() method would set it
to an empty array.
---
 include/class.dynamic_forms.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php
index a52990e5a..21324cbbd 100644
--- a/include/class.dynamic_forms.php
+++ b/include/class.dynamic_forms.php
@@ -537,7 +537,7 @@ class DynamicFormEntry extends VerySimpleModel {
             if ($field->hasData() && !$field->isPresentationOnly())
                 $a->save();
         }
-        $this->_values = array();
+        $this->_values = null;
     }
 
     function delete() {
-- 
GitLab