8000 [2.3] Workaround https://bugs.php.net/63206 · symfony/symfony@c5479dd · GitHub
[go: up one dir, main page]

Skip to content

Commit c5479dd

Browse files
[2.3] Workaround https://bugs.php.net/63206
1 parent 36eb818 commit c5479dd

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 () { 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