Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/04/2016, 11:07
javimarkez32
 
Fecha de Ingreso: abril-2016
Mensajes: 6
Antigüedad: 8 años
Puntos: 0
The controller must return a response (null given). Did you forget to add a return st

Hola buenas, estoy empezando con symfony, estoy creando una aplicacion para llevar la gestion de software utilizado en la empresa.
Tengo la siguiente funcion para crear un nuevo Software:
public function crearAction()
{
$Software = new Software();
$Software->setnombre('CAMTASIA STUDIO');
$Software->setfechaCompra(new \DateTime());
$Software->setempresa('');
$Software->setdistribuidor('COMSOFT');
$Software->setfechaFinal(new \DateTime());
$Software->setimporte(376.67);
$Software->setimporteFinal(376.67);
$Software->setdepartamento('TITULACIONES-COMUNICACIÓN');
$Software->setobservaciones('A TRAVÉS DE FUNDACIÓN TRIPARTITA');
$Software->setinformacion('SI');
$Software->setentregado('SI');

$em = $this->getDoctrine()->getManager();
$em->persist($software);
$em->flush();

return $this->render('AppBundle:Software:Software.html.twig', array('software' => $software));
}


Y me sale el siguiente error:
The controller must return a response (null given). Did you forget to add a return statement somewhere in your controller?


Alguien me podría echar una mano? Se lo agradecería bastante.
Muchas gracias y un saludo!!