mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Fix error when creating new redirector page (merged from 2.1.0 branch, r41675)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42913 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
75f598de37
commit
717737ed27
@ -36,7 +36,7 @@ class RedirectorPage extends Page {
|
||||
if($this->RedirectionType == 'External') {
|
||||
return $this->ExternalURL;
|
||||
} else {
|
||||
$linkTo = DataObject::get_by_id("SiteTree", $this->LinkToID);
|
||||
$linkTo = $this->LinkToID ? DataObject::get_by_id("SiteTree", $this->LinkToID) : null;
|
||||
if($linkTo) {
|
||||
return $linkTo->Link();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user