-
Notifications
You must be signed in to change notification settings - Fork 3
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
PHP warning when file_get_contents gets a non 200 response #5
Comments
@jamieburchell Thank you for pointing it out. I did not put |
H!, yes simply call for example the find method with an invalid postcode. If error reporting and display errors are configured you should see a PHP warning. In production at least this could mean a PHP warning in the logs for something which you are already handling as an error by checking the response. I'm not saying I'm right, just to me the warning seems pointless here. |
Also if you do switch to a package such as Guzzle you have more flexibility. For anyone who doesn't support remote file_get_contents for example. |
Closing this as it will be addressed in other issues. |
Partially related to #9 |
I'm wondering if this warning can/should be suppressed given the response error message is checked and an exception is thrown. One method might simply be to prefix the call with a gasp @ symbol.
I noticed cURL is used for POST but not GET; perhaps more control would be had using cURL for GET too?
The text was updated successfully, but these errors were encountered: