symfony/symfony — pull request #9908 by stloyd (2013-12-30 23:42:41+00:00)
Title: [HttpFoundation] Throw proper exception when invalid data is passed to JsonResponse class

| Q | A
| ------------- | ---
| Bug fix? | yes
| BC breaks? | no*
| Tests pass? | yes
| Fixed tickets | 9903
| License | MIT

* as described in mentioned issue, before this PR there was thrown exception `UnexpectedValueException`, which was not correct, but I guess some people trying to hide the bug could use `try {} catch` on it.