LSformElement_supannCompositeAttribute::getPostData(): fix handing empty form value

This commit is contained in:
Benjamin Renard 2021-07-07 17:50:56 +02:00
parent e8b8dd1730
commit 3161ace3b7

View file

@ -400,6 +400,11 @@ class LSformElement_supannCompositeAttribute extends LSformElement {
}
self :: log_debug($this." -> getPostData(): POST data = ".varDump($parseValues));
if (!$parseValue && $onlyIfPresent)
return true;
$return[$this -> name] = array();
// Check extracted values
$errors = array();
foreach ($parseValues as $parseValue) {
@ -498,7 +503,7 @@ class LSformElement_supannCompositeAttribute extends LSformElement {
foreach($errors as $e)
$this -> form -> setElementError($this -> attr_html, $e);
$this -> _postParsedData = $parseValues;
return true;
return true;
}
/**