amazon-s3-php-class
amazon-s3-php-class copied to clipboard
Fixed non-existent property "code" in response object (on failure) ..
When I used invalidateDistribution(), calling this method caused Notice. Reason is, StdClass with response does not contains property code (at least on request failure)..
Your commit changes getBucket(), not invalidateDistribution(). Have you applied the correct changes?
Note that $response->code is used for HTTP status, $response->error->code is used for other error types - CURL, AWS, etc.
Yes it is correct changes. I dont know detailly this library, but this fix helps me, to avoid notice (or Warning, I dont rememeber), when I call invalidateDistribution(). Try call this method, when you get failure. For example: call it with path without slash on the beginning of filenames to invalidate -> invalidateDistribution("distribtuinId", array("filename-without-slash.png"))