ftp_chdir(): Invalid number of parameters in when trying to access or create or delete file or directory in laravel 11
aeprograme opened this issue · comments
Bug Report
Q | A |
---|---|
Flysystem Version | 3.8.0 |
Adapter Name | FTP |
Adapter version |
Summary
Whenever i try to put/delete or list files/directories it throws "ftp_chdir(): Invalid number of parameters" error. The only thing currently working is get
How to reproduce
Try to create/append content/delete/list a file(s) or directories
Workaround
The only way i got it to work is by commenting the line [122] in [FtpAdapter.php]:
ftp_chdir($this->connection, $this->connectionOptions->root());
What PHP version are you on?
sorry for the late reply, internet was out all day yesterday.
PHP version : php-8.2.10RC1-Win32-vs16-x64
I'm not having a lot of luck debugging his, the version you specify doesn't correspond with the line-number you're reporting, which is odd: https://github.com/thephpleague/flysystem/blob/3.8.0/src/Ftp/FtpAdapter.php#L122 the last version that had this particular line was from more than 2 years ago. You've not specified your FTP adapter version btw, so it's a little bit hard to pin down. The error is also super weird, because the ftp_chdir
function has always 2 parameters as far as I know.