]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: Fix small psalm errors in FTP and LDAP connections
authorCôme Chilliet <come.chilliet@nextcloud.com>
Mon, 8 Apr 2024 15:10:08 +0000 (17:10 +0200)
committerCôme Chilliet <91878298+come-nc@users.noreply.github.com>
Tue, 9 Apr 2024 08:01:47 +0000 (10:01 +0200)
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
apps/files_external/lib/Lib/Storage/FtpConnection.php
apps/user_ldap/lib/Connection.php

index fa7302d0460551c1160213dc04032aa88be74921..0b6c1108d1cfd09ef0f5964fd974c8b60541fb65 100644 (file)
@@ -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 {
index 280cdcfa83f56c0ad050bb5bac4fe12b67ddc05f..9fafa7bf8590e3ac5a821afa93dbef304337d1fd 100644 (file)
@@ -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',