Skip to content

Commit e657fe2

Browse files
committed
Update components/http_foundation/introduction.rst
Typo in documentation that would cause an exception. setContent can not accept array. Assuming documentation meant setData.
1 parent f9f0ed1 commit e657fe2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/http_foundation/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ class, which can make this even easier::
431431
use Symfony\Component\HttpFoundation\JsonResponse;
432432

433433
$response = new JsonResponse();
434-
$response->setContent(array(
434+
$response->setData(array(
435435
'data' => 123
436436
));
437437

0 commit comments

Comments
 (0)