mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Fix error when creating new redirector page
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.1.0@41673 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d7f2aba95a
commit
ab1633fb67
@ -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