amazon-s3-php-class icon indicating copy to clipboard operation
amazon-s3-php-class copied to clipboard

Easy fix for getObjectInfo bug

Open rewb0rn opened this issue 6 years ago • 0 comments

Hi,

we found that getObjectInfo() is not checking for 403 error code, which can be returned instead of 404 when a file does not exist. This produces error logs although it is expected behavior. The fix is easy, please change this

if ($rest->error === false && ($rest->code !== 200 && $rest->code !== 404))

to this:

if ($rest->error === false && ($rest->code !== 200 && $rest->code !== 403 && $rest->code !== 404))

in getObjectInfo() (line 866 in current version)

rewb0rn avatar Sep 09 '19 13:09 rewb0rn