amazon-s3-php-class
amazon-s3-php-class copied to clipboard
Easy fix for getObjectInfo bug
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)