Skip to content

Commit 406c6f3

Browse files
blizzzbackportbot-nextcloud[bot]
authored andcommitted
initialize ldap prop instead of clumsy check
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
1 parent 5a75fd8 commit 406c6f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Service/LdapQuerent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
class LdapQuerent {
4040
private ConfigurationModel $configuration;
4141
private LoggerInterface $logger;
42-
protected ?Ldap $ldap;
42+
protected ?Ldap $ldap = null;
4343

4444
public function __construct(ConfigurationModel $configuration, LoggerInterface $logger) {
4545
$this->configuration = $configuration;
@@ -114,7 +114,7 @@ public function find(string $search, int $limit = 0): Generator {
114114
* @throws Exception
115115
*/
116116
protected function getClient(): Ldap {
117-
if (isset($this->ldap) && $this->ldap instanceof Ldap) {
117+
if ($this->ldap instanceof Ldap) {
118118
return $this->ldap;
119119
}
120120

0 commit comments

Comments
 (0)