From 7ed8108773cb797a48025b9985a864ad901ae94d Mon Sep 17 00:00:00 2001 From: Tobias Gross-Vogt <tgros@tugraz.at> Date: Thu, 1 Dec 2022 10:29:09 +0100 Subject: [PATCH] null reference fix --- src/LocalData/AbstractLocalDataPostEventSubscriber.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/LocalData/AbstractLocalDataPostEventSubscriber.php b/src/LocalData/AbstractLocalDataPostEventSubscriber.php index 47f6570..9000426 100644 --- a/src/LocalData/AbstractLocalDataPostEventSubscriber.php +++ b/src/LocalData/AbstractLocalDataPostEventSubscriber.php @@ -4,7 +4,9 @@ declare(strict_types=1); namespace Dbp\Relay\CoreBundle\LocalData; +use Dbp\Relay\CoreBundle\API\UserSessionInterface; use Dbp\Relay\CoreBundle\Authorization\AbstractAuthorizationService; +use Dbp\Relay\CoreBundle\Authorization\AuthorizationDataProviderProvider; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -18,6 +20,13 @@ abstract class AbstractLocalDataPostEventSubscriber extends AbstractAuthorizatio /** @var string[] */ private $attributeMapping; + public function __construct(UserSessionInterface $userSession, AuthorizationDataProviderProvider $authorizationDataProviderProvider) + { + parent::__construct($userSession, $authorizationDataProviderProvider); + + $this->attributeMapping = []; + } + public function setConfig(array $config) { $configNode = $config[self::CONFIG_NODE] ?? []; -- GitLab