ryanvade / flysystem-box

Flysystem Box.com Adapter
MIT License
3 stars 4 forks source link

FlysystemBox listContents calls LaravelBox::getFolderItems() with wrong parameters #6

Closed Helveg closed 5 years ago

Helveg commented 5 years ago
Fatal error:  Uncaught TypeError: Argument 2 passed to LaravelBox\LaravelBox::getFolderItems() must be of the type array, integer given, called in C:\UniServerZ\website\vendor\ryanvade\flysystem-box\src\BoxAdapter.php on line 214 and defined in C:\UniServerZ\website\vendor\ryanvade\laravel-box\src\LaravelBox\LaravelBox.php:184
Stack trace:
#0 C:\UniServerZ\website\vendor\ryanvade\flysystem-box\src\BoxAdapter.php(214): LaravelBox\LaravelBox->getFolderItems('/', 0, 1000)
#1 C:\UniServerZ\website\vendor\league\flysystem\src\Filesystem.php(271): FlysystemBox\BoxAdapter->listContents('', false)
#2 C:\UniServerZ\website\debug_sandbox.php(12): League\Flysystem\Filesystem->listContents()
#3 {main}
  thrown in C:\UniServerZ\website\vendor\ryanvade\laravel-box\src\LaravelBox\LaravelBox.php on line 184

Changing BoxAdapter.php line 214 to

            $resp = $this->client->getFolderItems($path, [], $offset, $limit);

seems to fix this.

yatsenkolesh commented 5 years ago

Already fixed in my pull - https://github.com/ryanvade/flysystem-box/pull/7

ryanvade commented 5 years ago

Pulled #7 in. Should fix this for now. Feel free to re-open if it does not.