This PR is a follow up to https://github.com/helpscout/helpscout-api-php/issues/277. While this doesn't resolve the underlying issue as to why the encoding wasn't successful, it does make the error surface more clearly. Throwing an exception is not a breaking change here because the return type expects a string, so any false return value from json_encode() will error out anyways.
This PR is a follow up to https://github.com/helpscout/helpscout-api-php/issues/277. While this doesn't resolve the underlying issue as to why the encoding wasn't successful, it does make the error surface more clearly. Throwing an exception is not a breaking change here because the return type expects a string, so any
false
return value fromjson_encode()
will error out anyways.