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
Can't get list of files on directory with FTP adapter in PHP 8.3
League\Flysystem\UnableToListContents ─── vendor/league/flysystem/src/UnableToListContents.php:17
│ Unable to list contents for '/{directory}', shallow listing Reason: array_sum(): Addition is not supported on type string
Bug Report
Summary
Can't get list of files on directory with FTP adapter in PHP 8.3
League\Flysystem\UnableToListContents ─── vendor/league/flysystem/src/UnableToListContents.php:17
│ Unable to list contents for '/{directory}', shallow listing Reason: array_sum(): Addition is not supported on type string
How to reproduce
Laravel 11 + PHP 8.3
$driver = Storage::createFtpDriver([
'host' => value,
'port' => value,
'username' => value,
'password' => value,
'throw' => true,
]);
$driver->files('path');
Possible fix
Locally can be fixed by casting values in FtpAdapter.php row 488 as:
return array_sum(array_map(fn ($permission) => (int) $permission, str_split($part)));
The text was updated successfully, but these errors were encountered: