Skip to content

Commit 5849a16

Browse files
committed
Fix bug in RepositoryFactory caused by incorrect checks.
1 parent 586db71 commit 5849a16

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Factory/RepositoryFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ final public function createAuthCodeRepository() : AuthCodeRepositoryInterface
3535
{
3636
static $clientEntity;
3737

38-
if ($this->repositories[Repository::AUTH_CODE] === null) {
38+
if (array_key_exists(Repository::AUTH_CODE, $this->repositories) === false) {
3939
$clientEntity = $this->createClientRepository()->createClientEntity();
4040
}
4141

@@ -61,7 +61,7 @@ final public function createScopeRepository() : ScopeRepositoryInterface
6161

6262
private function createOnce(string $className, array $properties = []): RepositoryInterface
6363
{
64-
if ($this->repositories[$className] === null) {
64+
if (array_key_exists($className, $this->repositories) === false) {
6565
$this->repositories[$className] = $this->create($className, $properties);
6666
}
6767

0 commit comments

Comments
 (0)