From d213002892aba7ecc158c98b6a493a05ef8b75f8 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Fri, 25 Mar 2016 19:42:42 +0100
Subject: [PATCH] FIX A not enabled field for list must not into fields to add

---
 htdocs/core/class/html.form.class.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index f00de387e2e..25775c36a77 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -4964,7 +4964,10 @@ class Form
         
         foreach($array as $key => $val)
         {
-           if (isset($val['enabled']) && ! $val['enabled']) 
+           /* var_dump($val);
+            var_dump(array_key_exists('enabled', $val));
+            var_dump(!$val['enabled']);*/
+           if (array_key_exists('enabled', $val) && ! $val['enabled']) 
            {
                unset($array[$key]);     // We don't want this field
                continue; 
-- 
GitLab