mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX #3814 bgribaudo: Don't throw an error on validation if no validator set
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78560 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c803dd6350
commit
710bb89396
@ -540,7 +540,7 @@ class Form extends RequestHandler {
|
||||
$attributes['enctype'] = $this->FormEncType();
|
||||
if($this->target) $attributes['target'] = $this->target;
|
||||
if($this->extraClass()) $attributes['class'] = $this->extraClass();
|
||||
if($this->validator->getErrors()) {
|
||||
if($this->validator && $this->validator->getErrors()) {
|
||||
if(!isset($attributes['class'])) $attributes['class'] = '';
|
||||
$attributes['class'] .= ' validationerror';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user