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)); self :: log_debug($this." -> getPostData(): POST data = ".varDump($parseValues));
if (!$parseValue && $onlyIfPresent)
return true;
$return[$this -> name] = array();
// Check extracted values // Check extracted values
$errors = array(); $errors = array();
foreach ($parseValues as $parseValue) { foreach ($parseValues as $parseValue) {