Skip to content

Commit

Permalink
fix array and string mode as well when all tags have been cleared
Browse files Browse the repository at this point in the history
  • Loading branch information
mjauvin committed Dec 8, 2024
1 parent 46b5e1e commit 983fca4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/backend/widgets/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -1227,8 +1227,8 @@ public function getSaveData(): array
// Exclude fields that didn't provide any value
$fieldValue = $this->dataArrayGet($result, $parts, FormField::NO_SAVE_DATA);
if ($fieldValue === FormField::NO_SAVE_DATA) {
if ($widget->getConfig('type') === 'taglist' && $widget->getConfig('mode') === 'relation') {
$fieldValue = [];
if ($widget->getConfig('type') === 'taglist') {
$fieldValue = in_array($widget->getConfig('mode'), ['array','relation']) ? [] : '';
} else {
continue;
}
Expand Down

0 comments on commit 983fca4

Please sign in to comment.