From f88508b3e1b6fc8483638f28aab34c3495338546 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Thu, 21 Nov 2013 10:35:54 -0600
Subject: [PATCH] forms: Fix validation error display on web submit

Fixes osTicket/osTicket-1.8#203
---
 include/class.dynamic_forms.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php
index 73868aca0..5b7664642 100644
--- a/include/class.dynamic_forms.php
+++ b/include/class.dynamic_forms.php
@@ -180,13 +180,14 @@ class TicketForm extends DynamicForm {
 
     static function getInstance() {
         if (!isset(static::$instance))
-            static::$instance = static::getNewInstance();
+            self::getNewInstance();
         return static::$instance;
     }
 
     static function getNewInstance() {
         $o = static::objects();
-        return $o[0]->instanciate();
+        static::$instance = $o[0]->instanciate();
+        return static::$instance;
     }
 }
 // Add fields from the standard ticket form to the ticket filterable fields
-- 
GitLab