Skip to content

Commit

Permalink
BUGFIX form->dataFieldByName appears to have been removed in newer ve…
Browse files Browse the repository at this point in the history
…rsions of SS3. User form->Fields()->dataFieldByName instead
  • Loading branch information
Shea Dawson committed Oct 6, 2013
1 parent c106be6 commit 7ef41a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/forms/MemberProfileValidator.php
Expand Up @@ -46,7 +46,7 @@ public function php($data) {
);

if ($other && (!$this->member || !$this->member->exists() || $other->ID != $this->member->ID)) {
$fieldInstance = $this->form->dataFieldByName($field);
$fieldInstance = $this->form->Fields()->dataFieldByName($field);

if($fieldInstance->getCustomValidationMessage()) {
$message = $fieldInstance->getCustomValidationMessage();
Expand All @@ -65,4 +65,4 @@ public function php($data) {
return $valid && parent::php($data);
}

}
}

0 comments on commit 7ef41a6

Please sign in to comment.