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

Update the default options to handle a null resize #10

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

Conversation

jacobfogg
Copy link

By leaving the resize option in the data object as an empty array, the API responds with an error message. To fix this, the code is now detecting if the resize option was passed in... if it was not, it simply removes resize from the json ecoded string.

Next, I updated your error messages to include 'response'. This will allow much easier debugging instead of simply returning "Unknown error"

I updated the spacing and code style to match the code style standards that all popular php frameworks, like Laravel and Symphony, use.

Finally, I modified the use of array() to leverage the [] brackets instead. Bracket array support was added with php version 5.4, which was released in 2013.

If any of these updates are unwelcomed, let me know and I'll happily make the updates. Fixing this issue in this repo and updating composer will simplify support for myself and everyone else using this..

By leaving the resize option in the data object as an empty array, the API responds with an error message. To fix this, the code is now detecting if the resize option was passed in... if it was not, it simply removes resize from the json ecoded string
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.

1 participant