Prevent fatal error in JsonRpc-Client #5956

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

marcuswinkler commented Mar 12, 2014

Zend\Server\Json\Response passes the json_decode()'d server response to its method setOptions(), which is type hinted as array. If the server response is anything but an array, this leads to a fatal error.

Maybe the Response class should be altogether more strict in its parsing of the response, but for now I just throw a RuntimeException, as pretty much anything is preferable to a fatal error.

Ocramius added this to the 2.3.1 milestone Apr 3, 2014

Ocramius self-assigned this Apr 3, 2014

@Ocramius Ocramius added a commit that referenced this pull request Apr 3, 2014

@Ocramius Ocramius Merge branch 'hotfix/#5956-zend-json-server-options-enforced-as-array…
…' into develop

Close #5956
e21951c

Ocramius closed this in a52e105 Apr 3, 2014

@gianarb gianarb pushed a commit to zendframework/zend-json that referenced this pull request May 15, 2015

@Ocramius Ocramius Merge branch 'hotfix/zendframework/zf2#5956-zend-json-server-options-…
…enforced-as-array'

Close zendframework/zendframework#5956
4dd2224

@gianarb gianarb pushed a commit to zendframework/zend-json that referenced this pull request May 15, 2015

@Ocramius Ocramius Merge branch 'hotfix/zendframework/zf2#5956-zend-json-server-options-…
…enforced-as-array' into develop

Close zendframework/zendframework#5956
5af4699
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment