bug #26228 [HttpFoundation] Fix missing "throw" in JsonResponse (nicolas-grekas)

This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Fix missing "throw" in JsonResponse

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

7490f0b [HttpFoundation] Fix missing "throw" in JsonResponse
This commit is contained in:
Nicolas Grekas 2018-02-19 17:19:49 +01:00
commit 820ad0732f
1 changed files with 1 additions and 0 deletions

View File

@ -148,6 +148,7 @@ class JsonResponse extends Response
if (\PHP_VERSION_ID < 50500 || !interface_exists('JsonSerializable', false)) {
restore_error_handler();
}
throw $e;
} catch (\Exception $e) {
if (\PHP_VERSION_ID < 50500 || !interface_exists('JsonSerializable', false)) {
restore_error_handler();