diff --git a/src/inc/apiv2/common/AbstractBaseAPI.class.php b/src/inc/apiv2/common/AbstractBaseAPI.class.php index 0ae33f05..c5018ace 100644 --- a/src/inc/apiv2/common/AbstractBaseAPI.class.php +++ b/src/inc/apiv2/common/AbstractBaseAPI.class.php @@ -398,7 +398,7 @@ protected static function db2json(array $feature, mixed $val): mixed $obj = array_map('intval', preg_split("/,/", $val, -1, PREG_SPLIT_NO_EMPTY)); } elseif ($feature['type'] == 'dict' && $feature['subtype'] = 'bool') { $obj = unserialize($val); - } elseif (str_starts_with($feature['type'], 'str')) { + } elseif (str_starts_with($feature['type'], 'str') && $val !== null) { $obj = html_entity_decode($val, ENT_COMPAT, "UTF-8"); } else {