Error: Call to a member function getNombre() on a non-object
500 Internal Server Error - FatalErrorException
Stack Trace
-
in src/AppBundle/Controller/DefaultController.php at line 402
$filter = $request->query->get('buscar');
$grupo = $em->getRepository('AppBundle:Vclasificacion')->findOneByNombre($filter);
$where = "t.iteId IN (SELECT t1.iteIteId FROM AppBundle:Vitemgrupo t1 WHERE t1.linea = '$filter') ";
$datos["titulo"] = $grupo->getNombre();
$tipoContenido = $em->getRepository('AppBundle:Tipocontenido')->findByGruGruId($grupo->getGruId());
$datos["tc"] = $tipoContenido ? $tipoContenido[0]->getTcId() : 0;
$session->set("mActive",$datos["tc"]); //su contenido