diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index 94976fc11..c110cc230 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -1223,7 +1223,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid // default pages if($this->class == 'SiteTree') { - if(!DataObject::get_one("SiteTree", "\"URLSegment\" = 'home'")) { + if(!SiteTree::get_by_link('home')) { $homepage = new Page(); $homepage->Title = _t('SiteTree.DEFAULTHOMETITLE', 'Home');