From 35e218beccff360c869ff4515c327eb0bf2bde81 Mon Sep 17 00:00:00 2001 From: Lebnik Date: Sun, 13 Dec 2015 19:03:21 +0300 Subject: [PATCH] I got error: Expected argument of type \"null\", \"Symfony\\Component\\HttpFoundation\\Request\" given https://github.com/symfony/form/blob/master/NativeRequestHandler.php#L55 "class": "'Symfony\\Component\\Form\\Exception\\UnexpectedTypeException'", "file": "'\/home\/www\/datravel\/datravel-website\/vendor\/symfony\/form\/NativeRequestHandler.php'", "line": "56", "level": 500, "level_name": "CRITICAL", #0 /vendor/symfony/form/Form.php(499): Symfony\Component\Form\NativeRequestHandler->handleRequest(Object(Symfony\Component\Form\Form), Object(Symfony\Component\HttpFoundation\Request)) #1 /application/controllers/product.php(335): Symfony\Component\Form\Form->handleRequest(Object(Symfony\Component\HttpFoundation\Request)) --- components/form/introduction.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/form/introduction.rst b/components/form/introduction.rst index b654f7bee0a..b731d5bf40e 100644 --- a/components/form/introduction.rst +++ b/components/form/introduction.rst @@ -102,7 +102,7 @@ object to read data off of the correct PHP superglobals (i.e. ``$_POST`` or Now, when you process a form, you can pass the :class:`Symfony\\Component\\HttpFoundation\\Request` object to :method:`Symfony\\Component\\Form\\Form::handleRequest`:: - $form->handleRequest($request); + $form->handleRequest(); .. note:: @@ -556,7 +556,7 @@ method: $request = Request::createFromGlobals(); - $form->handleRequest($request); + $form->handleRequest(); if ($form->isValid()) { $data = $form->getData(); @@ -582,7 +582,7 @@ method: ->add('dueDate', 'date') ->getForm(); - $form->handleRequest($request); + $form->handleRequest(); if ($form->isValid()) { $data = $form->getData();