Skip to content

Commit

Permalink
Update MultiSelectFromMultiSelect.php
Browse files Browse the repository at this point in the history
  • Loading branch information
AlternateIf authored and mattamon committed Nov 22, 2024
1 parent c3223f1 commit 5caac82
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ public function addCondition(AbstractFilterDefinitionType $filterDefinition, Pro
if (empty($value) && !$isReload) {
if (is_array($preSelect)) {
$value = $preSelect;
} else {
} elseif (is_string($preSelect)) {
$value = explode(',', $preSelect);
}

foreach ($value as $key => $v) {
if (!$v) {
unset($value[$key]);
if (is_iterable($value)) {
foreach ($value as $key => $v) {
if (!$v) {
unset($value[$key]);
}
}
}
} elseif (!empty($value) && in_array(AbstractFilterType::EMPTY_STRING, $value)) {
Expand Down

0 comments on commit 5caac82

Please sign in to comment.