8000 minor #17346 [2.3] Workaround https://bugs.php.net/63206 (nicolas-gre… · enumag/symfony@7a02f4e · GitHub
[go: up one dir, main page]

Skip to content

Commit 7a02f4e

Browse files
committed
minor symfony#17346 [2.3] Workaround https://bugs.php.net/63206 (nicolas-grekas)
This PR was merged into the 2.3 branch. Discussion ---------- [2.3] Workaround https://bugs.php.net/63206 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - This bug has almost no chance to be hit in this code but still, cleaning any potential issue is worth. Commits ------- c5479dd [2.3] Workaround https://bugs.php.net/63206
2 parents 36eb818 + c5479dd commit 7a02f4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/JsonResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function setData($data = array())
106106
// PHP 5.3 triggers annoying warnings for some
107107
// types that can't be serialized as JSON (INF, resources, etc.)
108108
// but doesn't provide the JsonSerializable interface.
109-
set_error_handler('var_dump', 0);
109+
set_error_handler(function () 485B { return false; });
110110
$data = @json_encode($data, $this->encodingOptions);
111111
} else {
112112
// PHP 5.4 and up wrap exceptions thrown by JsonSerializable

0 commit comments

Comments
 (0)
0