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

View file

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

View file

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