Skip to content

Commit

Permalink
Fix infinite recursion when passed an empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
corphi committed Jan 24, 2019
1 parent a5dd57f commit 35d3cc8
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -43,7 +43,7 @@ class AccessDecisionManager implements AccessDecisionManagerInterface
public function __construct($voters = [], $strategy = self::STRATEGY_AFFIRMATIVE, $allowIfAllAbstainDecisions = false, $allowIfEqualGrantedDeniedDecisions = true)
{
$strategyMethod = 'decide'.ucfirst($strategy);
if (!\is_callable([$this, $strategyMethod])) {
if (!\is_callable([$this, $strategyMethod]) || 6 === \strlen($strategyMethod)) {
throw new \InvalidArgumentException(sprintf('The strategy "%s" is not supported.', $strategy));
}

Expand Down

0 comments on commit 35d3cc8

Please sign in to comment.