Skip to content

Commit c14bb5a

Browse files
committed
don't cast strings exceeding the min/max int ranges
1 parent 37d3404 commit c14bb5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Form/ChoiceList/ORMQueryBuilderLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function getEntitiesByIds(string $identifier, array $values): array
6767

6868
// Filter out non-integer values (e.g. ""). If we don't, some
6969
// databases such as PostgreSQL fail.
70-
$values = array_values(array_filter($values, fn ($v) => (string) $v === (string) (int) $v || ctype_digit($v)));
70+
$values = array_values(array_filter($values, static fn ($v) => \is_string($v) && ctype_digit($v) || (string) $v === (string) (int) $v));
7171
} elseif (\in_array($type, ['ulid', 'uuid', 'guid'])) {
7272
$parameterType = class_exists(ArrayParameterType::class) ? ArrayParameterType::STRING : Connection::PARAM_STR_ARRAY;
7373

0 commit comments

Comments
 (0)