diff --git a/components/routing/introduction.rst b/components/routing/introduction.rst index 0efd881851d..010c23df86e 100644 --- a/components/routing/introduction.rst +++ b/components/routing/introduction.rst @@ -48,10 +48,9 @@ your autoloader to load the Routing component:: .. note:: - Be careful when using ``$_SERVER['REQUEST_URI']``, as it may include - any query parameters on the URL, which will cause problems with route - matching. An easy way to solve this is to use the HttpFoundation component - as explained :ref:`below `. + The :class:`Symfony\\Component\\Routing\\RequestContext` parameters can be populated + with the values stored in ``$_SERVER``, but it's easier to use the HttpFoundation + component as explained :ref:`below `. You can add as many routes as you like to a :class:`Symfony\\Component\\Routing\\RouteCollection`. diff --git a/cookbook/controller/upload_file.rst b/cookbook/controller/upload_file.rst index 19b2be6769a..087ae4d47ab 100644 --- a/cookbook/controller/upload_file.rst +++ b/cookbook/controller/upload_file.rst @@ -49,7 +49,7 @@ in the ``Product`` entity:: Note that the type of the ``brochure`` column is ``string`` instead of ``binary`` or ``blob`` because it just stores the PDF file name instead of the file contents. -Then, add a new ``brochure`` field to the form that manage the ``Product`` entity:: +Then, add a new ``brochure`` field to the form that manages the ``Product`` entity:: // src/AppBundle/Form/ProductType.php namespace AppBundle\Form; @@ -133,7 +133,7 @@ Finally, you need to update the code of the controller that handles the form:: // Update the 'brochure' property to store the PDF file name // instead of its contents - $product->setBrochure($filename); + $product->setBrochure($fileName); // ... persist the $product variable or any other work