From f4f2665fbaa4d3aaf770685e28452fce575713f6 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 5 Sep 2013 11:40:06 +0200 Subject: [PATCH] Fixed some vales check to globally permit 'zero string' value --- public_html/includes/class/class.LSformElement.php | 2 +- public_html/includes/class/class.LSldap.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public_html/includes/class/class.LSformElement.php b/public_html/includes/class/class.LSformElement.php index cdf07321..c3867544 100644 --- a/public_html/includes/class/class.LSformElement.php +++ b/public_html/includes/class/class.LSformElement.php @@ -223,7 +223,7 @@ class LSformElement { $_POST[$this -> name] = array($_POST[$this -> name]); } foreach($_POST[$this -> name] as $key => $val) { - if (!empty($val)) { + if (!empty($val)||(is_string($val)&&($val=="0"))) { $return[$this -> name][$key] = $val; } } diff --git a/public_html/includes/class/class.LSldap.php b/public_html/includes/class/class.LSldap.php index b6e5cbd8..45247a85 100644 --- a/public_html/includes/class/class.LSldap.php +++ b/public_html/includes/class/class.LSldap.php @@ -282,14 +282,14 @@ class LSldap { $drop = true; if (is_array($attrVal)) { foreach($attrVal as $val) { - if (!empty($val)) { + if (!empty($val)||(is_string($val)&&($val=="0"))) { $drop = false; $changeData[$attrName][]=$val; } } } else { - if (!empty($attrVal)) { + if (!empty($attrVal)||(is_string($attrVal)&&($attrVal=="0"))) { $drop = false; $changeData[$attrName][]=$attrVal; }