Skip to content
Browse files

MINOR Fixed usage of deprecated Form->dataFieldByName()

  • Loading branch information...
1 parent a6c586a commit 4524d1c59472122d2dcd6aa85ee8d40a7a6b0e7a @chillu chillu committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 code/forms/SiteTreeURLSegmentField.php
View
2 code/forms/SiteTreeURLSegmentField.php
@@ -44,7 +44,7 @@ function suggest($request) {
* @return SiteTree
*/
function getPage() {
- $idField = $this->getForm()->dataFieldByName('ID');
+ $idField = $this->getForm()->Fields()->dataFieldByName('ID');
return ($idField && $idField->Value()) ? DataObject::get_by_id('SiteTree', $idField->Value()) : singleton('SiteTree');
}

0 comments on commit 4524d1c

Please sign in to comment.
Something went wrong with that request. Please try again.