Skip to content

Commit

Permalink
Fix: Don't call html_entity_decode for null values
Browse files Browse the repository at this point in the history
  • Loading branch information
gluafamichl committed Oct 29, 2024
1 parent 1d3ade9 commit 4350656
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inc/apiv2/common/AbstractBaseAPI.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4350656

Please sign in to comment.