8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd0f798 commit 6e8c7fcCopy full SHA for 6e8c7fc
src/Symfony/Component/HttpFoundation/JsonResponse.php
@@ -106,9 +106,15 @@ public function setData($data = array())
106
}
107
});
108
109
- $this->data = json_encode($data, $this->encodingOptions);
+ try {
110
+ $this->data = json_encode($data, $this->encodingOptions);
111
- restore_error_handler();
112
+ restore_error_handler();
113
+ } catch (\Exception $exception) {
114
115
+
116
+ throw $exception;
117
+ }
118
119
if (JSON_ERROR_NONE !== json_last_error()) {
120
throw new \InvalidArgumentException($this->transformJsonError());
0 commit comments