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

json_encode fails for streams #38

Merged
merged 2 commits into from
Jul 6, 2016
Merged

json_encode fails for streams #38

merged 2 commits into from
Jul 6, 2016

Conversation

BreiteSeite
Copy link
Contributor

I will quote the message from commit 5f7043e:

ApiProblem was not able to render exceptions when the option
ApiProblem::detailIncludesStackTrace was true and the exception contained
PHP streams in the arguments of the traces ("args" key in
Exception::getTraces()). For example: GuzzleHttp works internally with
streams which meant that some exceptions raised from GuzzleHttp didn't
result in a ApiProblem response but in an empty 500 response because
json_encode() failed.

This PR fixes this issue.

The contribution guidelines didn't specify when to pull request against which branch, so if develop is not the correct target branch for the pull request, please let me know.

Thank you for considering my pull request.

Michael Kühn added 2 commits October 16, 2015 16:36
ApiProblem was not able to render exceptions when the option
ApiProblem::detailIncludesStackTrace was true and the exception contained
PHP streams in the arguments of the traces ("args" key in
Exception::getTraces()). For example: GuzzleHttp works internally with
streams which meant that some exceptions raised from GuzzleHttp didn't
result in a ApiProblem response but in an empty 500 response because
json_encode() failed.
The check for the availability of JSON_UNESCAPED_SLASHES is redundant
because we already require php >= 5.5 in composer.json and the constant
was introduced in PHP 5.4.

Also an check for the availability of ext-json was added to ensure
functions like json_encode() and the json constants are available.
@BreiteSeite BreiteSeite changed the title json encode fails for objects json_encode fails for streams Oct 16, 2015
@BreiteSeite
Copy link
Contributor Author

Whats the status of this PR? Does it need any additional work or information?

@weierophinney weierophinney added this to the 1.2.0 milestone Jul 6, 2016
@weierophinney weierophinney self-assigned this Jul 6, 2016
@weierophinney weierophinney merged commit 8768adc into zfcampus:develop Jul 6, 2016
weierophinney added a commit that referenced this pull request Jul 6, 2016
…r-objects

json_encode fails for streams

Conflicts:
      composer.json
weierophinney added a commit that referenced this pull request Jul 6, 2016
weierophinney added a commit that referenced this pull request Jul 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants