You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello ! There is a TypeError encountered in your source code, using the FtpAdapter.
When we connect one time to the FTP and we try to ->write(), an exception is thrown because the root directory is not present, not a problem for that. (Unable to resolve connection root. It does not seem to exist:).
When we try to ->write() a second time with the same instance, there is the TypeError, because the connection was successful but you could not set the rootDirectory which is null by default property the first time.
How to reproduce
Make sure the root directory passed is not created on the FTP.
From what I've seen in the source code (FtpAdapter), after the first call, ->connection becomes a resource but throws an exception when you try to set ->rootDirectory.
The second call, if ( !$this->hasFtpConnection()) { you don't go in this condition, and continues to line 102 when you call ftp_chdir with $this->rootDirectory to null.
Full trace of the Error here.
PHP Fatal error: Uncaught TypeError: ftp_chdir(): Argument #2 ($directory) must be of type string, null given in /data/apps/app_paper/vendor/league/flysystem-ftp/FtpAdapter.php:102
Stack trace:
#0 /data/apps/app_paper/vendor/league/flysystem-ftp/FtpAdapter.php(102): ftp_chdir()
#1 /data/apps/app_paper/vendor/league/flysystem-ftp/FtpAdapter.php(661): League\Flysystem\Ftp\FtpAdapter->connection()
#2 /data/apps/app_paper/vendor/league/flysystem-ftp/FtpAdapter.php(162): League\Flysystem\Ftp\FtpAdapter->prefixer()
#3 /data/apps/app_paper/vendor/league/flysystem-ftp/FtpAdapter.php(148): League\Flysystem\Ftp\FtpAdapter->writeStream()
#4 /data/apps/app_paper/vendor/league/flysystem/src/Filesystem.php(55): League\Flysystem\Ftp\FtpAdapter->write()
#5 /data/apps/app_paper/src/Tasks/EnvoiTask.php(191): League\Flysystem\Filesystem->write()
The text was updated successfully, but these errors were encountered:
Bug Report
Summary
Hello ! There is a TypeError encountered in your source code, using the FtpAdapter.
When we connect one time to the FTP and we try to
->write()
, an exception is thrown because the root directory is not present, not a problem for that. (Unable to resolve connection root. It does not seem to exist:).When we try to
->write()
a second time with the same instance, there is the TypeError, because the connection was successful but you could not set therootDirectory
which isnull
by default property the first time.How to reproduce
Make sure the root directory passed is not created on the FTP.
From what I've seen in the source code (
FtpAdapter
), after the first call,->connection
becomes aresource
but throws an exception when you try to set->rootDirectory
.The second call,
if ( !$this->hasFtpConnection()) {
you don't go in this condition, and continues to line 102 when you callftp_chdir
with$this->rootDirectory
tonull
.Full trace of the Error here.
The text was updated successfully, but these errors were encountered: