Skip to content

Commit fb868f2

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: Safeguard dynamic access to Doctrine metadata properties Enhance error handling in StaticPrefixCollection for compatibility with libpcre2-10.43
2 parents e4fb1e1 + 07ce0b6 commit fb868f2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Form/DoctrineOrmTypeGuesser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ private static function getRealClass(string $class): string
195195
private static function getMappingValue(array|JoinColumnMapping $mapping, string $key): mixed
196196
{
197197
if ($mapping instanceof JoinColumnMapping) {
198-
return $mapping->$key;
198+
return $mapping->$key ?? null;
199199
}
200200

201201
return $mapping[$key] ?? null;

PropertyInfo/DoctrineExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ private function getPhpType(string $doctrineType): ?string
279279
private static function getMappingValue(array|AssociationMapping|EmbeddedClassMapping|FieldMapping|JoinColumnMapping $mapping, string $key): mixed
280280
{
281281
if ($mapping instanceof AssociationMapping || $mapping instanceof EmbeddedClassMapping || $mapping instanceof FieldMapping || $mapping instanceof JoinColumnMapping) {
282-
return $mapping->$key;
282+
return $mapping->$key ?? null;
283283
}
284284

285285
return $mapping[$key] ?? null;

Validator/DoctrineLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private function getExistingUniqueFields(ClassMetadata $metadata): array
137137
private static function getFieldMappingValue(array|FieldMapping $mapping, string $key): mixed
138138
{
139139
if ($mapping instanceof FieldMapping) {
140-
return $mapping->$key;
140+
return $mapping->$key ?? null;
141141
}
142142

143143
return $mapping[$key] ?? null;

0 commit comments

Comments
 (0)