Fatal error: Call to a member function getCountVue() on null in /homepages/14/d422478032/htdocs/src/OC/PlatformBundle/Controller/DefaultController.php on line 147
Error: Call to a member function getCountVue() on null (500 Internal Server Error)

Error: Call to a member function getCountVue() on null

500 Internal Server Error - FatalErrorException

Stack Trace

  1. in src/OC/PlatformBundle/Controller/DefaultController.php at line 147  -
    1.     public function NosOffresDEmploiAnnonceNewAction($id,Request $request){
    2.         $repository $this->getDoctrine()->getManager()->getRepository('OCUserBundle:Sy_Annonce');//Recup annonce new
    3.         $annonce $repository->find($id);
    4.         $count $annonce->getCountVue();
    5.         $annonce->setCountVue($count+1);
    6.         $em $this->getDoctrine()->getManager();
    7.                 $em->persist($annonce);

Logs  -

Stack Trace (Plain Text)  +