Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function getName() on null in /home/forge/chosenby.eu/src/AppBundle/Controller/ElasticProductController.php:158 Stack trace: #0 /home/forge/chosenby.eu/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(151): AppBundle\Controller\ElasticProductController->indexAction(Object(Symfony\Component\HttpFoundation\Request), Array, 'Produkty', '', NULL) #1 /home/forge/chosenby.eu/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #2 /home/forge/chosenby.eu/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(200): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #3 /home/forge/chosenby.eu/web/app.php(26): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #4 {main} thrown in /home/forge/chosenby.eu/src/AppBundle/Controller/ElasticProductController.php on line 158