Skip to content

Commit 8fa45a1

Browse files
scaytrasefabpot
authored andcommitted
[Validator] Check cascasdedGroups for being countable
1 parent d294051 commit 8fa45a1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -746,9 +746,7 @@ private function validateGenericNode($value, $object, $cacheKey, MetadataInterfa
746746
// The $cascadedGroups property is set, if the "Default" group is
747747
// overridden by a group sequence
748748
// See validateClassNode()
749-
$cascadedGroups = count($cascadedGroups) > 0
750-
? $cascadedGroups
751-
: $groups;
749+
$cascadedGroups = null !== $cascadedGroups && count($cascadedGroups) > 0 ? $cascadedGroups : $groups;
752750

753751
if (is_array($value)) {
754752
// Arrays are always traversed, independent of the specified

0 commit comments

Comments
 (0)