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)
3636 {
3737 $ this ->manager = $ manager ;
3838
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 ' );
4242 $ 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 ' );
4446 $ this ->voters = $ reflection ->getValue ($ manager );
4547 }
4648 }
You can’t perform that action at this time.
0 commit comments