Calling `delete()` causes some phpseclib errors and does not delete the file
cgsmith opened this issue · comments
Chris Smith commented
I receive the following error with this code.
Warning: Attempt to assign property of non-object in vendor\phpseclib\phpseclib\phpseclib\Net\SFTP.php on line 1152
Warning: Attempt to assign property of non-object in vendor\phpseclib\phpseclib\phpseclib\Net\SFTP.php on line 1155
$sftp = new Filesystem(new SftpAdapter([
'host' => $this->config['ftpServer'],
'port' => $this->config['ftpPort'],
'username' => $this->config['ftpUser'],
'password' => $this->config['ftpPass'],
'timeout' => 10,
]));
$manager = new MountManager([
'sftp' => $sftp,
]);
$contents = $manager->read('sftp://'.$file['path']); // Read contents
$manager->delete('sftp://'.$file['path']); // Delete file
The file does not delete from the remote SFTP site.
Versions
PHP: 7.0.11
Flysystem-SFTP: 1.0
Frank de Jonge commented
It looks like a permission problem on your end tho, don't think we can remedy this from Flysystem's end.
Chris Smith commented
Thank you! I will close the issue. Happy New Year!
Frank de Jonge commented
@cgsmith happy new year to you too!