ZF-8757: Zend_Json_Server_Response should return null for error if there is no error


When there is no error, Zend_Json_Server_Response will not return it, however in the JSON-RPC specification if there is no error it must be returned as null.…


I set component and auto-reassign.

This appears to be fixed in trunk

While the code in trunk appears fix the JSON-RPC 1.0 spec, it unfortunately seems to break the JSON-RPC 2.0:

bq. Exactly one of result or error MUST be specified. It's not allowed to specify both or none.….

The old code followed the 2.0 spec.

This patch should allow the server to respond correctly to 1.0 and 2.0 specification requests.