File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,13 @@ public function __construct(AccessDecisionManagerInterface $manager)
36
36
{
37
37
$ this ->manager = $ manager ;
38
38
39
- if ( $ this -> manager instanceof AccessDecisionManager) {
40
- // The strategy and voters are stored in a private properties of the decorated service
41
- $ reflection = new \ReflectionProperty (AccessDecisionManager::class , 'strategy ' );
39
+ // The strategy and voters are stored in a private properties of the decorated service
40
+ if ( property_exists ( $ manager , ' strategy ' )) {
41
+ $ reflection = new \ReflectionProperty (\get_class ( $ manager ) , 'strategy ' );
42
42
$ this ->strategy = $ reflection ->getValue ($ manager );
43
- $ reflection = new \ReflectionProperty (AccessDecisionManager::class, 'voters ' );
43
+ }
44
+ if (property_exists ($ manager , 'voters ' )) {
45
+ $ reflection = new \ReflectionProperty (\get_class ($ manager ), 'voters ' );
44
46
$ this ->voters = $ reflection ->getValue ($ manager );
45
47
}
46
48
}
You can’t perform that action at this time.
0 commit comments