then, i got a error message:
<b>Fatal error</b>: Call to a member function has() on a non-object in <b>E:\wwwroot\symfony2\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\Controller\Controller.php</b> on line <b>161</b><br />
in the B controller, the insertData function works normally.
there is the inserData() function of B Controller below:
- Code: Select all
public function insertWiki() {
$wiki = new Wiki();
return 1111;
$user = $this->getDoctrine()->getRepository('AcmeUserBundle:User')->find($this->getCurrentID());
return 2222;
$wiki->setUser($user);
$wiki->setParent('0');
$wiki->setMimeType('0');
$wiki->setMenuOrder(0);
$wiki->setCommmentCount(0);
$form = $this->createForm(new WikiForm(), $wiki);
return 1111;
return $this->renderView('AcmeWikiBundle:Admin:create.html.twig', array('form' => $form->createView()));
}
return 1111 is working;
return 2222 not works.
