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

fix response array conversion #70

Merged

Conversation

Mdhesari
Copy link
Contributor

@Mdhesari Mdhesari commented May 8, 2022

When deleting media, it always returns 0 event when the file is actually deleted, so I figured out the problem by tracing code and find out array conversion is not happening when retrieving media.

@unicodeveloper
Copy link
Collaborator

@Mdhesari not sure I get what you mean, there is a check on the next line for determining if the response is an array or not.

@brandon14
Copy link

@unicodeveloper I think what he is saying, is the API call to destroy doesn't return an array, but rather an ApiResponse object. So the check for is_array will always fail without an explicit cast to an array. thus always returning false even on a sucess.

@unicodeveloper
Copy link
Collaborator

@brandon14 thanks for clarifying. I understand better now.

@unicodeveloper unicodeveloper merged commit 7f02391 into cloudinary-community:master Jun 3, 2022
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

3 participants