فهرست منبع

Merge branch 'hotfix/fix_entity_voter_return'

Olivier Massot 1 سال پیش
والد
کامیت
24ff019edd
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/Security/Voter/EntityVoter/AbstractEntityVoter.php

+ 1 - 1
src/Security/Voter/EntityVoter/AbstractEntityVoter.php

@@ -72,7 +72,7 @@ abstract class AbstractEntityVoter extends Voter
             throw new \RuntimeException('Setup the self::$entityClass property, or override the supports() method');
         }
 
-        return $subject::class === static::$entityClass && in_array($attribute, static::$allowedOperations);
+        return $subject !== null && $subject::class === static::$entityClass && in_array($attribute, static::$allowedOperations);
     }
 
     /**