mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #7756 from dhensby/pulls/4.0/fix-bad-request-form-handlers
Forms with FormHandlers don't have access to current request object
This commit is contained in:
commit
a8c156ae98
@ -228,6 +228,7 @@ class FormRequestHandler extends RequestHandler
|
||||
// First, try a handler method on the controller (has been checked for allowed_actions above already)
|
||||
$controller = $this->form->getController();
|
||||
if ($controller && $controller->hasMethod($funcName)) {
|
||||
$controller->setRequest($request);
|
||||
return $controller->$funcName($vars, $this->form, $request, $this);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user