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

BaseError fails to handle null response #23

Open
quinncomendant opened this issue May 8, 2017 · 0 comments
Open

BaseError fails to handle null response #23

quinncomendant opened this issue May 8, 2017 · 0 comments

Comments

@quinncomendant
Copy link

BaseError::__constructor expects its second argument $response to be an array with specific values. The $response argument will be null if the server produces a HTTP 500 Internal Server Error, and the following php errors produced:

PHP Warning:  array_map(): Argument #2 should be an array in /var/www/lib/vendor/basecrm/basecrm-php/lib/Errors/BaseError.php on line 21
Warning: array_map(): Argument #2 should be an array in /var/www/lib/vendor/basecrm/basecrm-php/lib/Errors/BaseError.php on line 21
PHP Warning:  implode(): Invalid arguments passed in /var/www/lib/vendor/basecrm/basecrm-php/lib/Errors/BaseError.php on line 21
Warning: implode(): Invalid arguments passed in /var/www/lib/vendor/basecrm/basecrm-php/lib/Errors/BaseError.php on line 21

It also seems a useful exception is not raise.

I don't know how to fix this, I just wanted to note that it can happen.

zerodewishes added a commit to zerodewishes/basecrm-php that referenced this issue Mar 14, 2023
BaseError fails to handle null response
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

No branches or pull requests

1 participant