Fatal error: Call to a member function getSlug() on a non-object in /home/hepcomeu/public_html/src/Hepcom/FrontEndBundle/Controller/News/ViewNewsController.php on line 15
Error: Call to a member function getSlug() on a non-object (500 Internal Server Error)
Exception detected!

Error: Call to a member function getSlug() on a non-object

500 Internal Server Error - FatalErrorException

Stack Trace

  1. in src/Hepcom/FrontEndBundle/Controller/News/ViewNewsController.php at line 15  -
    1.         $user           $this->get('security.context')->getToken()->getUser();
    2.         $newsEntity     $em->getRepository('FrontEndBundle:News')->findOneBy(array('slug' => $new));
    3.         $listNews       $em->getRepository('FrontEndBundle:News')->findFilteredNews($em10$newsEntity->getSlug());
    4.         $imgDomain "http://" $this->container->getParameter('files_url');
    5.         $file_headers = @get_headers($imgDomain "/" $newsEntity->getWebPath());
    6.         $imagePath "";

Logs  -

Stack Trace (Plain Text)  +