Skip to content

Commit

Permalink
fix generic form
Browse files Browse the repository at this point in the history
  • Loading branch information
ad3n committed Mar 22, 2015
1 parent 679d672 commit fff965d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Controller/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ protected function getForm($data = null)
try {
$formObject = $this->container->get($this->formClass);
} catch (\Exception $ex) {
$formObject = new $this->formClass();
} finally {
$formObject = new GenericFormType($this, $this->container);
if ($this->formClass) {
$formObject = new $this->formClass();
} else {
$formObject = new GenericFormType($this, $this->container);
}
}

$form = $this->createForm($formObject);
Expand Down

0 comments on commit fff965d

Please sign in to comment.