Skip to content

Commit 4350656

Browse files
author
gluafamichl
committed
Fix: Don't call html_entity_decode for null values
1 parent 1d3ade9 commit 4350656

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/inc/apiv2/common/AbstractBaseAPI.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ protected static function db2json(array $feature, mixed $val): mixed
398398
$obj = array_map('intval', preg_split("/,/", $val, -1, PREG_SPLIT_NO_EMPTY));
399399
} elseif ($feature['type'] == 'dict' && $feature['subtype'] = 'bool') {
400400
$obj = unserialize($val);
401-
} elseif (str_starts_with($feature['type'], 'str')) {
401+
} elseif (str_starts_with($feature['type'], 'str') && $val !== null) {
402402
$obj = html_entity_decode($val, ENT_COMPAT, "UTF-8");
403403
}
404404
else {

0 commit comments

Comments
 (0)