From 3a816a27bdcfde5703e2571211926b083d6d761c Mon Sep 17 00:00:00 2001 From: novah77 Date: Mon, 9 Sep 2024 14:29:30 +0300 Subject: [PATCH] Fix call to an undefined method setContentDisposition() This commit fix the call to an undefined method named "setContentDisposition" of class "Symfony\Component\HttpFoundation\Response". --- components/http_foundation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/http_foundation.rst b/components/http_foundation.rst index 21e9bbfb13e..f144e378bef 100644 --- a/components/http_foundation.rst +++ b/components/http_foundation.rst @@ -850,7 +850,7 @@ or change its ``Content-Disposition``:: // ... $response->headers->set('Content-Type', 'text/plain'); - $response->setContentDisposition( + $response->headers->set('Content-Disposition', ResponseHeaderBag::DISPOSITION_ATTACHMENT, 'filename.txt' );