From d249dc5196753d245acac4514c21334ff3151c02 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Fri, 24 Oct 2014 10:41:38 -0500
Subject: [PATCH] forms: Empty regex for TextboxField is an error

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

diff --git a/include/class.forms.php b/include/class.forms.php
index 5f0301503..2ef313db8 100644
--- a/include/class.forms.php
+++ b/include/class.forms.php
@@ -676,7 +676,7 @@ class TextboxField extends FormField {
                     $wrapped = "/".$value."/iu";
                     if (false === @preg_match($value, ' ')
                             && false !== @preg_match($wrapped, ' ')) {
-                        return $wrapped;
+                        $value = $wrapped;
                     }
                     if ($value == '//iu')
                         return '';
-- 
GitLab