Exception detected!

Fatal error: Call to a member function getId() on null

500 Internal Server Error - FatalThrowableError

Stack Trace

  1. in src/PointWeb/NewsBundle/Controller/DefaultController.php at line 19  -
    1.         $repo $this->getDoctrine()->getRepository('PointWebNewsBundle:News');
    2.         if ($type != 'all') {
    3.             $type $this->getDoctrine()->getRepository('PointWebNewsBundle:Type')->find($type);
    4.             $type $type->getId();
    5.         }
    6.         $listnews $repo->findCurrent($month$yearnullnull$type);
    7.         $count count($listnews);
  2. at DefaultController ->indexAction (object(Request), '10', '22', null, '1')
  3. at call_user_func_array (array(object(DefaultController), 'indexAction'), array(object(Request), '10', '22', 'Salons & séminaires', '1'))
    in app/bootstrap.php.cache at line 3054  +
  4. at HttpKernel ->handleRaw (object(Request), '1')
    in app/bootstrap.php.cache at line 3016  +
  5. at HttpKernel ->handle (object(Request), '1', true)
    in app/bootstrap.php.cache at line 3165  +
  6. at ContainerAwareHttpKernel ->handle (object(Request), '1', true)
    in app/bootstrap.php.cache at line 2406  +
  7. at Kernel ->handle (object(Request))
    in web/app.php at line 28  +

Logs  -

Stack Trace (Plain Text)  +