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)
Error: Call to a member function getViewCount() on null
500 Internal Server Error - FatalErrorException
Stack Trace
in src/VE/CoreBundle/Services/CoreTools.php at line 96
}
public function incrementViewsCounter($entity){
$inc = $entity->getViewCount()+1;
$entity->setViewCount($inc);
$this->em->persist($entity);
$this->em->flush();
Logs
Stack Trace (Plain Text)
[1] Symfony\Component\Debug\Exception\FatalErrorException: Error: Call to a member function getViewCount() on null
at n/a
in /home/lesvitamines/public_html/appli/src/VE/CoreBundle/Services/CoreTools.php line 96