diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-04-08 17:10:08 +0200 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-04-09 10:01:47 +0200 |
commit | 72a0da6d4eff6f9f15fa428a214a7e276c8cea61 (patch) | |
tree | 4abb0012422c50341690ff9ecf974ecd53e5336e /apps | |
parent | d4229f9f590a2c3107906c21116d05edc7f13127 (diff) | |
download | nextcloud-server-72a0da6d4eff6f9f15fa428a214a7e276c8cea61.tar.gz nextcloud-server-72a0da6d4eff6f9f15fa428a214a7e276c8cea61.zip |
fix: Fix small psalm errors in FTP and LDAP connections
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/FtpConnection.php | 5 | ||||
-rw-r--r-- | apps/user_ldap/lib/Connection.php | 3 |
2 files changed, 2 insertions, 6 deletions
diff --git a/apps/files_external/lib/Lib/Storage/FtpConnection.php b/apps/files_external/lib/Lib/Storage/FtpConnection.php index fa7302d0460..0b6c1108d1c 100644 --- a/apps/files_external/lib/Lib/Storage/FtpConnection.php +++ b/apps/files_external/lib/Lib/Storage/FtpConnection.php @@ -50,10 +50,7 @@ class FtpConnection { } public function __destruct() { - if ($this->connection) { - ftp_close($this->connection); - } - $this->connection = null; + ftp_close($this->connection); } public function setUtf8Mode(): bool { diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php index 280cdcfa83f..9fafa7bf859 100644 --- a/apps/user_ldap/lib/Connection.php +++ b/apps/user_ldap/lib/Connection.php @@ -446,8 +446,7 @@ class Connection extends LDAPUtility { private function doCriticalValidation(): bool { $configurationOK = true; - $errorStr = 'Configuration Error (prefix '. - (string)$this->configPrefix .'): '; + $errorStr = 'Configuration Error (prefix ' . $this->configPrefix . '): '; //options that shall not be empty $options = ['ldapHost', 'ldapUserDisplayName', |