bug #9917 [HttpFoundation] fixed PHP warnings (fabpot)
This PR was merged into the 2.5-dev branch.
Discussion
----------
[HttpFoundation] fixed PHP warnings
Commits
-------
cf71e22
[HttpFoundation] fixed PHP warnings
This commit is contained in:
commit
df6b0b8282
@ -91,7 +91,7 @@ class JsonResponse extends Response
|
||||
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());
|
||||
|
Reference in New Issue
Block a user