Skip to content

Commit

Permalink
fix: empty multiple-value field
Browse files Browse the repository at this point in the history
  • Loading branch information
Rom1-B authored and cedric-anne committed Oct 2, 2023
1 parent 23b5b8c commit d95f6e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inc/container.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,8 @@ public function updateFieldsValues($data, $itemtype, $massiveaction = false)
}
if (array_key_exists($field_name, $data)) {
$data[$field_name] = json_encode($data[$field_name]);
} elseif (array_key_exists('_' . $field_name . '_defined', $data)) {
$data[$field_name] = json_encode([]);
}
}

Expand Down

0 comments on commit d95f6e8

Please sign in to comment.