Skip to content

Commit e492768

Browse files
committed
Check the value of enable_max_depth if defined
1 parent 9d71217 commit e492768

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Bridge/Doctrine/Orm/Extension/EagerLoadingExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private function joinRelations(QueryBuilder $queryBuilder, QueryNameGeneratorInt
136136

137137
foreach ($classMetadata->associationMappings as $association => $mapping) {
138138
//Don't join if max depth is enabled and the current depth limit is reached
139-
if (0 === $currentDepth && isset($normalizationContext[AbstractObjectNormalizer::ENABLE_MAX_DEPTH])) {
139+
if (0 === $currentDepth && ($normalizationContext[AbstractObjectNormalizer::ENABLE_MAX_DEPTH] ?? false)) {
140140
continue;
141141
}
142142

0 commit comments

Comments
 (0)