From f3a564609151c27e60f1238e9dcc0361482a7c7d Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Wed, 6 May 2015 16:17:05 -0500
Subject: [PATCH] oops: Fix several crashes surrounding custom forms

---
 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 202948ed8..d78f8f66c 100644
--- a/include/class.forms.php
+++ b/include/class.forms.php
@@ -56,7 +56,7 @@ class Form {
 
     function setFields($fields) {
 
-        if (!is_array($fields))
+        if (!is_array($fields) && !$fields instanceof Traversable)
             return;
 
         $this->fields = $fields;
-- 
GitLab