Skip to content

Conversation

adambisek
Copy link

When I used invalidateDistribution(), calling this method caused Notice.
Reason is, StdClass with response does not contains property code (at least on request failure)..

@tpyo
Copy link
Owner

tpyo commented Sep 20, 2013

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.

@adambisek
Copy link
Author

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"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants