mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #5089 from jakedaleweb/3
added if statement to catch NULL validators
This commit is contained in:
commit
c4f850003b
@ -1301,7 +1301,9 @@ class LeftAndMain extends Controller implements PermissionProvider {
|
|||||||
// The clientside (mainly LeftAndMain*.js) rely on ajax responses
|
// The clientside (mainly LeftAndMain*.js) rely on ajax responses
|
||||||
// which can be evaluated as javascript, hence we need
|
// which can be evaluated as javascript, hence we need
|
||||||
// to override any global changes to the validation handler.
|
// to override any global changes to the validation handler.
|
||||||
$form->setValidator($validator);
|
if($validator != NULL){
|
||||||
|
$form->setValidator($validator);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$form->unsetValidator();
|
$form->unsetValidator();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user