Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit fbbaca1

Browse files
committed
Fix infinite recursion when passed an empty string
1 parent 5d37b80 commit fbbaca1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Core/Authorization/AccessDecisionManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class AccessDecisionManager implements AccessDecisionManagerInterface
4343
public function __construct($voters = [], $strategy = self::STRATEGY_AFFIRMATIVE, $allowIfAllAbstainDecisions = false, $allowIfEqualGrantedDeniedDecisions = true)
4444
{
4545
$strategyMethod = 'decide'.ucfirst($strategy);
46-
if (!\is_callable([$this, $strategyMethod])) {
46+
if ('' === $strategy || !\is_callable([$this, $strategyMethod])) {
4747
throw new \InvalidArgumentException(sprintf('The strategy "%s" is not supported.', $strategy));
4848
}
4949

0 commit comments

Comments
 (0)