Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed non-existent property "code" in response object (on failure) .. #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixed non-existent property "code" in response object (on failure) .. #59

wants to merge 1 commit into from

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.

None yet

2 participants