Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Prevent fatal error in JsonRpc-Client #5956

Closed

Conversation

marcuswinkler
Copy link
Contributor

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 Ocramius added this to the 2.3.1 milestone Apr 3, 2014
@Ocramius Ocramius self-assigned this Apr 3, 2014
Ocramius added a commit that referenced this pull request Apr 3, 2014
@Ocramius Ocramius closed this in a52e105 Apr 3, 2014
gianarb pushed a commit to zendframework/zend-json that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-json that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-json that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants