aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-04-29 17:11:25 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-04-30 09:24:01 +0200
commit85cea1960b1c15874a03d6dbc7408ca2dedf40ea (patch)
tree32a7302b820ea387b2521a2a97b7529a6334cbc9
parent0df60486931276b9a5600a18aca2195826af23b9 (diff)
downloadnextcloud-server-85cea1960b1c15874a03d6dbc7408ca2dedf40ea.tar.gz
nextcloud-server-85cea1960b1c15874a03d6dbc7408ca2dedf40ea.zip
fix: Avoid useless reference usage in user_ldap
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--apps/user_ldap/lib/Group_Proxy.php2
-rw-r--r--apps/user_ldap/lib/LDAP.php1
-rw-r--r--apps/user_ldap/lib/User_Proxy.php2
3 files changed, 3 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Group_Proxy.php b/apps/user_ldap/lib/Group_Proxy.php
index 1544d5f91e9..718e915372f 100644
--- a/apps/user_ldap/lib/Group_Proxy.php
+++ b/apps/user_ldap/lib/Group_Proxy.php
@@ -73,7 +73,7 @@ class Group_Proxy extends Proxy implements \OCP\GroupInterface, IGroupLDAP, IGet
$this->backends[$configPrefix] =
new Group_LDAP($this->getAccess($configPrefix), $this->groupPluginManager, $this->config, $this->ncUserManager);
if (is_null($this->refBackend)) {
- $this->refBackend = &$this->backends[$configPrefix];
+ $this->refBackend = $this->backends[$configPrefix];
}
}
diff --git a/apps/user_ldap/lib/LDAP.php b/apps/user_ldap/lib/LDAP.php
index 01f4e16ab10..9322b6fbdaa 100644
--- a/apps/user_ldap/lib/LDAP.php
+++ b/apps/user_ldap/lib/LDAP.php
@@ -204,6 +204,7 @@ class LDAP implements ILDAPWrapper {
$serverControls = [];
}
+ /** @psalm-suppress UndefinedVariable $oldHandler is defined when the closure is called but psalm fails to get that */
$oldHandler = set_error_handler(function ($no, $message, $file, $line) use (&$oldHandler) {
if (str_contains($message, 'Partial search results returned: Sizelimit exceeded')) {
return true;
diff --git a/apps/user_ldap/lib/User_Proxy.php b/apps/user_ldap/lib/User_Proxy.php
index 96415491e41..3df1990359a 100644
--- a/apps/user_ldap/lib/User_Proxy.php
+++ b/apps/user_ldap/lib/User_Proxy.php
@@ -97,7 +97,7 @@ class User_Proxy extends Proxy implements IUserBackend, UserInterface, IUserLDAP
);
if (is_null($this->refBackend)) {
- $this->refBackend = &$this->backends[$configPrefix];
+ $this->refBackend = $this->backends[$configPrefix];
}
}