gpt4 book ai didi

symfony - Controller 必须返回响应

转载 作者:行者123 更新时间:2023-12-04 08:56:39 25 4
gpt4 key购买 nike

这是我的 Controller :

    /**
* Finds and displays a Formacion entity.
*
* @Route("/{id}/show", name="curso_show")
* @Template()
*/
public function showAction($id)
{
$em = $this->getDoctrine()->getEntityManager();

$curso = $em->getRepository('GitekUdaBundle:Curso')->find($id);

if (!$curso) {
throw $this->createNotFoundException('Unable to find Curso entity.');
}

$deleteForm = $this->createDeleteForm($id);

// Detalle Formación
$detcurso = new Detcurso();
$formdetcurso = $this->createForm(new DetcursoType(), $detcurso);

return array(
'curso' => $curso,
'delete_form' => $deleteForm->createView(),
'detcurso' => $detcurso,
'formdetcurso' => $formdetcurso,
);
}

在我的开发环境中工作正常(Mac)但是当我进入我的生产环境(CentOS 服务器)时,我得到了
The controller must return a response (Array(curso => Object(Gitek\UdaBundle\Entity\Curso), delete_form => Object(Symfony\Component\Form\FormView), detcurso => Object(Gitek\UdaBundle\Entity\Detcurso), formdetcurso => Object(Symfony\Component\Form\Form)) given).

500 内部服务器错误 - LogicException

有什么线索吗?

最佳答案

关于symfony - Controller 必须返回响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9063103/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com