`Invalid argument supplied for foreach()` in SftpAdapter when calling `listContents`
dmaicher opened this issue · comments
David Maicher commented
I'm using version 2.0.5 and I have an issue when I want to list directory contents with a path that does not exist on the server.
Basically this call returns false
: https://github.com/thephpleague/flysystem-sftp/blob/2.x/SftpAdapter.php#L258
Which can happen in some cases: https://github.com/phpseclib/phpseclib/blob/master/phpseclib/Net/SFTP.php#L849
So we end up iterating over false
which fails.
David Maicher commented
Reported here instead: thephpleague/flysystem#1300