0

When my controller code below is executed, the routing shows __isInitialized__. I have no idea why this could happen.

Expected result : .....?city=1

Current result : ....?city[__isInitialized__]=1

Controller

if ($form->get('saveAndAdd')->isClicked()) {
    return $this->redirectToRoute('create_post', array('city' => 1));
}

Route

create_post:
    path: /create
    defaults:
        _controller: AcmeDemoBundle:Main:create
david
  • 3,225
  • 9
  • 30
  • 43

0 Answers0