added if statement to catch NULL validators

This commit is contained in:
Jake Ovenden 2016-02-24 15:13:00 +13:00
parent 2cc03bf97d
commit 48ecb8d8f4

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();
}