Skip to content

Commit ffc70d4

Browse files
committed
Only traverse arrays that should be cascaded
1 parent c960265 commit ffc70d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,8 @@ private function validateGenericNode($value, $object, $cacheKey, MetadataInterfa
655655

656656
$cascadingStrategy = $metadata->getCascadingStrategy();
657657

658-
// Quit unless we have an array or a cascaded object
659-
if (!\is_array($value) && !($cascadingStrategy & CascadingStrategy::CASCADE)) {
658+
// Quit unless we cascade
659+
if (!($cascadingStrategy & CascadingStrategy::CASCADE)) {
660660
return;
661661
}
662662

0 commit comments

Comments
 (0)