KnpLabs / Gaufrette

PHP library that provides a filesystem abstraction layer − will be a feast for your files!

Home Page:http://knplabs.github.io/Gaufrette

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AwsS3 Adapter isDirectory() fails

andreasschacht opened this issue · comments

https://github.com/KnpLabs/Gaufrette/blob/v0.4.0/src/Gaufrette/Adapter/AwsS3.php#L272
result in an Exception with PHP 7.2:
[object] (RuntimeException(code: 0): count(): Parameter must be an array or an object that implements Countable at /var/www/symfony/vendor/knplabs/gaufrette/src/Gaufrette/Adapter/AwsS3.php:235)

The Documentation of ListObjects says that $result['Contents'] is an array.
http://docs.aws.amazon.com/aws-sdk-php/v3/api/api-s3-2006-03-01.html#listobjects

It looks like, the Aws\S3\S3Client or the documentation is incorrect.