Skip to content

Commit

Permalink
make sure that the link exists before getting it - EditorService
Browse files Browse the repository at this point in the history
  • Loading branch information
takeit committed Jan 30, 2015
1 parent fcd0b92 commit 14e57fb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions newscoop/library/Newscoop/Services/EditorService.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ public function getLink($article)
'articleLanguage' => $language->getCode()
)));

$editorLink = $arguments->getArgument('link');
if ($editorLink) {
return $editorLink;
if ($arguments->hasArgument('link') && $arguments->getArgument('link')) {
return $arguments->getArgument('link');
}

return self::DEFAULT_EDITOR_LINK . $this->getLinkParameters($article);
Expand Down

0 comments on commit 14e57fb

Please sign in to comment.