Fixed some vales check to globally permit 'zero string' value

This commit is contained in:
Benjamin Renard 2013-09-05 11:40:06 +02:00
parent 3e069a5907
commit f4f2665fba
2 changed files with 3 additions and 3 deletions

View file

@ -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;
}
}

View file

@ -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;
}