FIX : Extrafield intshowzero in list (#29789)

* add test

* x

---------

Co-authored-by: jpb <jean-pascal.boudet@atm-consulting>
This commit is contained in:
boudet jean pascal 2024-05-31 15:29:59 +02:00 committed by GitHub
parent 4c1768afd5
commit 4b2cd22a2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,6 +29,8 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield
$datenotinstring = $db->jdate($datenotinstring);
}
$value = $datenotinstring;
} elseif (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('int'))) {
$value = (!empty($obj->$tmpkey) || $obj->$tmpkey === '0' ? $obj->$tmpkey : '');
} else {
$value = (!empty($obj->$tmpkey) ? $obj->$tmpkey : '');
}