Fatal error: Call to a member function getViewCount() on null in /home/lesvitamines/public_html/appli/src/VE/CoreBundle/Services/CoreTools.php on line 96
Error: Call to a member function getViewCount() on null (500 Internal Server Error)
Exception detected!

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

500 Internal Server Error - FatalErrorException

Stack Trace

  1. in src/VE/CoreBundle/Services/CoreTools.php at line 96  -
    1.     }
    2.     public function incrementViewsCounter($entity){
    3.         $inc $entity->getViewCount()+1;
    4.         $entity->setViewCount($inc);
    5.         $this->em->persist($entity);
    6.         $this->em->flush();

Logs  -

Stack Trace (Plain Text)  +