http://118.139.165.71:8080/

Exceptions

Notice: Undefined index: HTTP_USER_AGENT

Exception

Symfony\Component\Debug\Exception\ ContextErrorException

  1.             '/webos/i' => 'Mobile'
  2.         );
  3.         //Return true if Mobile User Agent is detected
  4.         foreach($aMobileUA as $sMobileKey => $sMobileOS){
  5.             if(preg_match($sMobileKey$_SERVER['HTTP_USER_AGENT'])){
  6.                 return true;
  7.             }
  8.         }
  9.         //Otherwise return false..  
  10.         return false;
DefaultController->isMobileDevice() in src/FoodAirwaySiteBundle/Controller/DefaultController.php (line 72)
  1.         return $this->etagResponse($response$request);
  2.     }
  3.     public function indexAction(Request $request)
  4.     {
  5.         if ($this->isMobileDevice()) {
  6.             return $this->redirect($this->generateUrl('food_airway_site_product_listing'));
  7.         }
  8.         
  9.         $dataService $this->container->get('FoodAirwayApiBundle\Services\DataService');
DefaultController->indexAction(object(Request)) in vendor/symfony/http-kernel/HttpKernel.php (line 151)
  1.         $this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS$event);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response = \call_user_func_array($controller$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new GetResponseForControllerResultEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch(KernelEvents::VIEW$event);
HttpKernel->handleRaw(object(Request), 1) in vendor/symfony/http-kernel/HttpKernel.php (line 68)
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
HttpKernel->handle(object(Request), 1, true) in vendor/symfony/http-kernel/Kernel.php (line 200)
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle(object(Request)) in public/index.php (line 29)
  1.     Request::setTrustedHosts([$trustedHosts]);
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

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)