Skip to content

Commit

Permalink
bug #9917 [HttpFoundation] fixed PHP warnings (fabpot)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.5-dev branch.

Discussion
----------

[HttpFoundation] fixed PHP warnings

Commits
-------

cf71e22 [HttpFoundation] fixed PHP warnings
  • Loading branch information
fabpot committed Dec 31, 2013
2 parents 410d399 + cf71e22 commit df6b0b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpFoundation/JsonResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function setCallback($callback = null)
public function setData($data = array())
{
// Encode <, >, ', &, and " for RFC4627-compliant JSON, which may also be embedded into HTML.
$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);

if (JSON_ERROR_NONE !== json_last_error()) {
throw new \InvalidArgumentException($this->transformJsonError());
Expand Down

0 comments on commit df6b0b8

Please sign in to comment.