File tree 2 files changed +6
-2
lines changed
src/Symfony/Component/HttpFoundation
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,9 @@ public function setData($data = array())
107
107
});
108
108
109
109
try {
110
+ // Clear json_last_error()
111
+ json_encode (null );
112
+
110
113
$ this ->data = json_encode ($ data , $ this ->encodingOptions );
111
114
112
115
restore_error_handler ();
Original file line number Diff line number Diff line change @@ -203,8 +203,9 @@ public function testSetContent()
203
203
}
204
204
205
205
/**
206
- * @expectedException PHPUnit_Framework_Error_Warning
207
- * @expectedExceptionMessage This error is expected
206
+ * @expectedException Exception
207
+ * @expectedExceptionMessage Failed calling Symfony\Component\HttpFoundation\Tests\JsonSerializableObject::jsonSerialize()
208
+ * @link http://php.net/manual/en/jsonserializable.jsonserialize.php#114688
208
209
*/
209
210
public function testSetContentJsonSerializeError ()
210
211
{
You can’t perform that action at this time.
0 commit comments