From e657fe20dbe054a4d34a3b7b45988d5c1e7853dd Mon Sep 17 00:00:00 2001 From: Cangit Date: Mon, 3 Dec 2012 14:12:50 +0100 Subject: [PATCH] Update components/http_foundation/introduction.rst Typo in documentation that would cause an exception. setContent can not accept array. Assuming documentation meant setData. --- components/http_foundation/introduction.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/http_foundation/introduction.rst b/components/http_foundation/introduction.rst index ad051871445..01fc84aae53 100644 --- a/components/http_foundation/introduction.rst +++ b/components/http_foundation/introduction.rst @@ -431,7 +431,7 @@ class, which can make this even easier:: use Symfony\Component\HttpFoundation\JsonResponse; $response = new JsonResponse(); - $response->setContent(array( + $response->setData(array( 'data' => 123 ));