Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/inc/apiv2/common/AbstractBaseAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ protected static function db2json(array $feature, mixed $val): mixed {
$obj = array_map('intval', preg_split("/,/", $val, -1, PREG_SPLIT_NO_EMPTY));
}
elseif (str_starts_with($feature['type'], 'str') && $val !== null) {
$obj = html_entity_decode($val, ENT_COMPAT, "UTF-8");
$obj = $val;
Comment thread
novasam23 marked this conversation as resolved.
}
else {
// TODO: Check all objects, instead of wild cast to hopefully-JSON compatible object
Comment thread
novasam23 marked this conversation as resolved.
Expand All @@ -632,7 +632,7 @@ protected static function json2db(array $feature, mixed $obj): ?string {
$val = $obj;
}
elseif (str_starts_with($feature['type'], 'str')) {
$val = htmlentities($obj, ENT_QUOTES, "UTF-8");
$val = $obj;
Comment thread
novasam23 marked this conversation as resolved.
}
elseif ($feature['type'] == 'array' && ($feature['subtype'] == 'int' || $feature['subtype'] == 'string')) {
$val = implode(",", $obj);
Expand Down
Loading