1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-11 16:49:42 +01:00

SFTP: "fix" rare resource not closed error

This commit is contained in:
terrafrost 2020-08-30 08:21:50 -05:00
parent ded9b3043f
commit f4e017f383

View File

@ -2151,7 +2151,9 @@ class Net_SFTP extends Net_SSH2
$this->touch($remote_file, $stat['mtime'], $stat['atime']);
}
fclose($fp);
if (isset($fp) && is_resource($fp)) {
fclose($fp);
}
}
return $this->_close_handle($handle);