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',