From 72a0da6d4eff6f9f15fa428a214a7e276c8cea61 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Mon, 8 Apr 2024 17:10:08 +0200 Subject: [PATCH] fix: Fix small psalm errors in FTP and LDAP connections MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/files_external/lib/Lib/Storage/FtpConnection.php | 5 +---- 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', -- 2.39.5