8000 [Validator] Check cascasdedGroups for being countable by scaytrase · Pull Request #21155 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Validator] Check cascasdedGroups for being countable #21155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Check cascasdedGroups for being countable
Prevents notice for PHP 7.2
  • Loading branch information
scaytrase authored Jan 4, 2017
commit c95510f257cd16c0035bb1870bd813d635b5401d
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ private function validateGenericNode($value, $object, $cacheKey, MetadataInterfa
// The $cascadedGroups property is set, if the "Default" group is
// overridden by a group sequence
// See validateClassNode()
$cascadedGroups = count($cascadedGroups) > 0
$cascadedGroups = ((is_array($cascadedGroups) || $cascadedGroups instanceof \Countable) && count($cascadedGroups) > 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surrounding brackets should be removed

? $cascadedGroups
: $groups;

Expand Down
0