Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4fe0130

Browse files
committed
fix TypeError: Doctrine\DBAL\Types\TypeRegistry::has(): Argument symfony#1 ($name) must be of type string
1 parent 6145108 commit 4fe0130

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function getEntitiesByIds(string $identifier, array $values): array
6969
// Filter out non-integer values (e.g. ""). If we don't, some
7070
// databases such as PostgreSQL fail.
7171
$values = array_values(array_filter($values, static fn ($v) => \is_string($v) && ctype_digit($v) || (string) $v === (string) (int) $v));
72-
} elseif (\in_array($type, ['ulid', 'uuid', 'guid']) || (Type::hasType($type) && is_subclass_of(Type::getType($type), AbstractUidType::class))) {
72+
} elseif ($type !== null && (\in_array($type, ['ulid', 'uuid', 'guid']) || (Type::hasType($type) && is_subclass_of(Type::getType($type), AbstractUidType::class)))) {
7373
$parameterType = class_exists(ArrayParameterType::class) ? ArrayParameterType::STRING : Connection::PARAM_STR_ARRAY;
7474

7575
// Like above, but we just filter out empty strings.

0 commit comments

Comments
 (0)