Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2021-05-31 15:24:29 +02:00
parent df3ae3eec7
commit a3f893ee37
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
2 changed files with 6 additions and 1 deletions

View File

@ -41,7 +41,7 @@ class FTP extends Common {
private $port;
private $utf8Mode;
/** @var FtpConnection */
/** @var FtpConnection|null */
private $connection;
public function __construct($params) {
@ -66,6 +66,10 @@ class FTP extends Common {
}
}
public function __destruct() {
$this->connection = null;
}
protected function getConnection(): FtpConnection {
if (!$this->connection) {
try {

View File

@ -60,6 +60,7 @@ class FtpTest extends \Test\Files\Storage\Storage {
if ($this->instance) {
$this->instance->rmdir('');
}
$this->instance = null;
parent::tearDown();
}