8000 The error handling in JsonResponse should not silent all errors · Issue #11415 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

The error handling in JsonResponse should not silent all errors #11415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stof opened this issue Jul 18, 2014 · 0 comments
Closed

The error handling in JsonResponse should not silent all errors #11415

stof opened this issue Jul 18, 2014 · 0 comments
Labels
Good first issue Ideal for your first contribution! (some Symfony experience may be required)

Comments

@stof
Copy link
Member
stof commented Jul 18, 2014

To make debugging easier, the error handling in

$this->data = @json_encode($data, $this->encodingOptions);
should not silent all errors but only the warnings coming from json_encode itself.

See cf71e22#commitcomment-7045622 for more details.

@stof stof added the Easy Pick label Jul 18, 2014
fabpot added a commit that referenced this issue Sep 22, 2014
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes #11418).

Discussion
----------

[JsonResponse] Silent only JSON errors

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | maybe
| Fixed tickets | #11415
| License       | MIT
| Doc PR        | n/a

Commits
-------

6d6a3af Clear json_last_error
ef91f71 Fix JsonSerializable namespace
d952f90 Catch exceptions to restore the error handler
ddf95c7 [HttpFoundation] Silent only JSON errors
@fabpot fabpot closed this as completed Sep 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Ideal for your first contribution! (some Symfony experience may be required)
Projects
None yet
Development

No branches or pull requests

3 participants
0