Skip to content

Commit

Permalink
Prevent inserting blank entries for extensible data list.
Browse files Browse the repository at this point in the history
  • Loading branch information
raviks789 authored and Thomas-Gelf committed Apr 20, 2022
1 parent 2c56d5a commit 67eb4c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/Director/DataType/DataTypeDatalist.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ public function getFormElement($name, QuickForm $form)

$db = $form->getDb();
foreach ($value as $entry) {
$this->createEntryIfNotExists($db, $listId, $entry);
if ($entry !== '') {
$this->createEntryIfNotExists($db, $listId, $entry);
}
}
});
}
Expand Down

0 comments on commit 67eb4c1

Please sign in to comment.