Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a3afd87

Browse files
Fix the 'supports' method argument type of the security voter
1 parent 0109515 commit a3afd87

File tree

1 file changed

+1
-1
lines changed
  • src/Symfony/Component/Security/Core/Authorization/Voter

1 file changed

+1
-1
lines changed

src/Symfony/Component/Security/Core/Authorization/Voter/Voter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function vote(TokenInterface $token, $subject, array $attributes)
3030
$vote = self::ACCESS_ABSTAIN;
3131

3232
foreach ($attributes as $attribute) {
33-
if (!$this->supports($attribute, $subject)) {
33+
if (!\is_string($attribute) || !$this->supports($attribute, $subject)) {
3434
continue;
3535
}
3636

0 commit comments

Comments
 (0)