loopline-systems / closeio-api-wrapper

PHP Wrapper to use the Close.io API
MIT License
14 stars 15 forks source link

Error when error field not returned to response #1

Closed mickadoo closed 9 years ago

mickadoo commented 9 years ago

array_merge doesn't check if both arrays exist on Notice: Undefined index: errors in /closeio-api-wrapper/src/LooplineSystems/CloseIoApiWrapper/CloseIoResponse.php on line 112

Can be reproduced by sending an incorrectly formatted phone number to close.io (which returns a response containing only 'field_errors' but not 'errors'.