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.
2 parents 410d399 + cf71e22 commit df6b0b8Copy full SHA for df6b0b8
src/Symfony/Component/HttpFoundation/JsonResponse.php
@@ -91,7 +91,7 @@ public function setCallback($callback = null)
91
public function setData($data = array())
92
{
93
// Encode <, >, ', &, and " for RFC4627-compliant JSON, which may also be embedded into HTML.
94
- $this->data = json_encode($data, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT);
+ $this->data = @json_encode($data, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT);
95
96
if (JSON_ERROR_NONE !== json_last_error()) {
97
throw new \InvalidArgumentException($this->transformJsonError());
0 commit comments