mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
added if statement to catch NULL validators
This commit is contained in:
parent
2cc03bf97d
commit
48ecb8d8f4
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user