Fix "Undefined variable: ex"
This commit is contained in:
@@ -168,7 +168,6 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
|
|||||||
|
|
||||||
// Error (Default: false)
|
// Error (Default: false)
|
||||||
$error_msg = false;
|
$error_msg = false;
|
||||||
$ex = new \Exception();
|
|
||||||
|
|
||||||
// Create the Form from the request
|
// Create the Form from the request
|
||||||
$updateSeoForm = $this->getUpdateSeoForm($this->getRequest());
|
$updateSeoForm = $this->getUpdateSeoForm($this->getRequest());
|
||||||
@@ -222,15 +221,17 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
|
|||||||
// Pass it to the parser
|
// Pass it to the parser
|
||||||
$this->getParserContext()->addForm($changeForm);
|
$this->getParserContext()->addForm($changeForm);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setupFormErrorContext(
|
if (false !=== $error_msg) {
|
||||||
$this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)),
|
$this->setupFormErrorContext(
|
||||||
$error_msg,
|
$this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)),
|
||||||
$updateSeoForm,
|
$error_msg,
|
||||||
$ex
|
$updateSeoForm,
|
||||||
);
|
$ex
|
||||||
|
);
|
||||||
// At this point, the form has errors, and should be redisplayed.
|
|
||||||
return $this->renderEditionTemplate();
|
// At this point, the form has errors, and should be redisplayed.
|
||||||
|
return $this->renderEditionTemplate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user