Error: Call to a member function getCategoryId() on null
500 Internal Server Error - FatalErrorException
Stack Trace
-
in src/DDD/AppBundle/Controller/DefaultController.php at line 271
// song detail
$ttl = str_replace(".html", "", $url);
$song = $em->getRepository('DDD\AppBundle\Entity\Audio')->findOneByTitleEncoded($ttl); //get related song
$categ_id = $song->getCategoryId();
if (!$song) {
//audio file not found in db