Exceptions
Exception
Symfony\Component\Debug\Exception\ ContextErrorException
DefaultController->isMobileDevice()
in
src/FoodAirwaySiteBundle/Controller/DefaultController.php
(line 72)
DefaultController->indexAction(object(Request))
in
vendor/symfony/http-kernel/HttpKernel.php
(line 151)
$this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS, $event);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = \call_user_func_array($controller, $arguments);
// view
if (!$response instanceof Response) {
$event = new GetResponseForControllerResultEvent($this, $request, $type, $response);
$this->dispatcher->dispatch(KernelEvents::VIEW, $event);
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
Stack Trace
ContextErrorException |
---|
Symfony\Component\Debug\Exception\ContextErrorException: Notice: Undefined index: HTTP_USER_AGENT at src/FoodAirwaySiteBundle/Controller/DefaultController.php:154 at FoodAirwaySiteBundle\Controller\DefaultController->isMobileDevice() (src/FoodAirwaySiteBundle/Controller/DefaultController.php:72) at FoodAirwaySiteBundle\Controller\DefaultController->indexAction(object(Request)) (vendor/symfony/http-kernel/HttpKernel.php:151) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:68) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:200) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:29) |