Merge pull request #5089 from jakedaleweb/3

added if statement to catch NULL validators
This commit is contained in:
Damian Mooyman 2016-02-26 09:29:53 +13:00
commit c4f850003b

View File

@ -1301,7 +1301,9 @@ class LeftAndMain extends Controller implements PermissionProvider {
// The clientside (mainly LeftAndMain*.js) rely on ajax responses
// which can be evaluated as javascript, hence we need
// to override any global changes to the validation handler.
$form->setValidator($validator);
if($validator != NULL){
$form->setValidator($validator);
}
} else {
$form->unsetValidator();
}