diff --git a/code/pages/MediaPage.php b/code/pages/MediaPage.php index 02d3f51..44333a2 100644 --- a/code/pages/MediaPage.php +++ b/code/pages/MediaPage.php @@ -363,8 +363,8 @@ public function onBeforeWrite() { public function Link($action = null) { $parent = $this->getParent(); - if (!$parent) { - return ''; + if(!$parent) { + return null; } $date = ($parent->URLFormatting !== '-') ? $this->dbObject('Date')->Format($parent->URLFormatting) : ''; $link = $parent->Link() . "{$date}{$this->URLSegment}/"; @@ -381,8 +381,8 @@ public function Link($action = null) { public function AbsoluteLink($action = null) { $parent = $this->getParent(); - if (!$parent) { - return ''; + if(!$parent) { + return null; } $date = ($parent->URLFormatting !== '-') ? $this->dbObject('Date')->Format($parent->URLFormatting) : ''; $link = $parent->AbsoluteLink() . "{$date}{$this->URLSegment}/";