Skip to content

Commit 595af4b

Browse files
committed
Avoid warning Undefined array key "type" in ClassMetadata
1 parent 4d22016 commit 595af4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2408,7 +2408,7 @@ public function mapField(array $mapping): array
24082408
} elseif (empty($mapping['type'])) {
24092409
$mapping['type'] = $this->generatorType === self::GENERATOR_TYPE_INCREMENT ? Type::INT : Type::CUSTOMID;
24102410
}
2411-
} elseif ($mapping['type'] !== Type::UUID) {
2411+
} elseif (empty($mapping['type']) || $mapping['type'] !== Type::UUID) {
24122412
$mapping['type'] = Type::ID;
24132413
}
24142414

0 commit comments

Comments
 (0)