i edited the post
where i set $appartement:
$appartement = new Apartement ();
$user=1;
$em = $this->getDoctrine()->getManager();
$appartement = $em->getRepository('LeymaxDashboardBundle:Apartement')->find(1);
well i think that i have a syntax error that what i have in the controller that send s params to twig file :
return $this->render('LeymaxDashboardBundle:Default:client.html.twig', array('apart' => $appartement,
'user' => $connected_user->getId(),
));
in the twig file i do the following :
{{ path('leymax_changemodules_showModal',{'iduser': user,'profil':'client','apart':apart}) }}
the generated route is like so :
leymax_changemodules_showModal:
pattern: /changemodulesModal/{iduser}/{profil}/{apart}
defaults: { _controller: LeymaxDashboardBundle:Default:changeModulesModal }
the error message :
An exception has been thrown during the rendering of a template ("Warning: preg_match() expects parameter 2 to be string, object given
what's wrong i'm doing ?
$userand$apartand the exception message + stacktrace ...