Skip to content

[Security] voters now are going to be obligated to return int values #39248

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 9 commits into from
Prev Previous commit
Next Next commit
type check
  • Loading branch information
adeptofvoltron committed Nov 30, 2020
commit d71489626a5df59c47ce4e52a5fb2651dcd10968
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function vote(TokenInterface $token, $subject, array $attributes): int
{
$result = $this->voter->vote($token, $subject, $attributes);

if (false === \in_array($result, [self::ACCESS_DENIED, self::ACCESS_GRANTED, self::ACCESS_ABSTAIN])) {
if (false === \in_array($result, [self::ACCESS_DENIED, self::ACCESS_GRANTED, self::ACCESS_ABSTAIN], true)) {
@trigger_error(
sprintf('Return value of "%s::vote()" should always be of the type int since Symfony 5.0, %s returned.', \get_class($this->voter), \gettype($result)),
\E_USER_DEPRECATED
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy