Skip to content

Commit 402efbd

Browse files
authored
Fix access to null $config variable (#2732)
1 parent a33bf09 commit 402efbd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Doctrine/ODM/MongoDB/DocumentManager.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ protected function __construct(?Client $client = null, ?Configuration $config =
159159
],
160160
);
161161

162-
$this->classNameResolver = $config->isLazyGhostObjectEnabled()
162+
$this->classNameResolver = $this->config->isLazyGhostObjectEnabled()
163163
? new CachingClassNameResolver(new LazyGhostProxyClassNameResolver())
164164
: new CachingClassNameResolver(new ProxyManagerClassNameResolver($this->config));
165165

@@ -186,8 +186,8 @@ protected function __construct(?Client $client = null, ?Configuration $config =
186186

187187
$this->unitOfWork = new UnitOfWork($this, $this->eventManager, $this->hydratorFactory);
188188
$this->schemaManager = new SchemaManager($this, $this->metadataFactory);
189-
$this->proxyFactory = $config->isLazyGhostObjectEnabled()
190-
? new LazyGhostProxyFactory($this, $config->getProxyDir(), $config->getProxyNamespace(), $config->getAutoGenerateProxyClasses())
189+
$this->proxyFactory = $this->config->isLazyGhostObjectEnabled()
190+
? new LazyGhostProxyFactory($this, $this->config->getProxyDir(), $this->config->getProxyNamespace(), $this->config->getAutoGenerateProxyClasses())
191191
: new StaticProxyFactory($this);
192192
$this->repositoryFactory = $this->config->getRepositoryFactory();
193193
}

0 commit comments

Comments
 (0)