diff --git a/src/Components/AjaxSelect/Entities/AggregateEntity.php b/src/Components/AjaxSelect/Entities/AggregateEntity.php index 86d1e26..8f1150d 100644 --- a/src/Components/AjaxSelect/Entities/AggregateEntity.php +++ b/src/Components/AjaxSelect/Entities/AggregateEntity.php @@ -80,9 +80,9 @@ public function setOptions(array $options) { protected abstract function getGroupTitle($prefix); /** - * Groups values by known prefixes. + * Groups values by known prefixes, ignores unknown prefixes. * @param $value - * @return array|bool + * @return array */ protected function groupByPrefix($value) { if (!is_array($value)) { @@ -117,7 +117,6 @@ protected function groupByPrefix($value) { } // value has invalid prefix or no prefix at all -> it's invalid - return FALSE; } return $byPrefix; @@ -168,11 +167,6 @@ public function areValidValues(array $values) { $result = array_combine($values, array_fill(0, count($values), FALSE)); $byPrefix = $this->groupByPrefix($values); - if ($byPrefix === FALSE) { - // invalid prefix(es), sorry - return $result; - } - foreach ($byPrefix as $prefix => $nestedValues) { $entity = $this->entities[$prefix]; $areValid = $entity->areValidValues($nestedValues);