0
プロダクションサーバでのみ発生する奇妙な問題があります。私のコントローラは、必要なときにルートパラメータを受信しています
私は/ 1/configに入ると、nullでなければならない$ post_typeはエンティティを受け取ります。
他のルート/ 1 /設定/ 1作業罰金
/**
* Config a post entity.
*
* @Route("/{id}/config", name="post_config")
* @Route("/{id}/config/{post_type}", name="post_config_type")
* @Method({"GET", "POST"})
*/
public function configAction(Request $request, Post $post, PostType $post_type = null)
{
$em = $this->getDoctrine()->getManager();
$post_type_list = $em->getRepository('AppBundle:PostType')->findBy(array('enabled' => true));
if (!is_null($post_type)){
// code
}
// more code
}
私は本当に、多分サーバーの構成の問題を問題を見つけることができません。
ありがとうございました。