Fix a notice when the author is missing

This commit is contained in:
Michael 2019-06-21 17:57:26 +00:00
parent b07490266c
commit b5de71c390

View File

@ -41,6 +41,9 @@ class Fetch extends BaseModule
$item = Item::selectFirst(['author-link'], $condition);
if (empty($item)) {
$parts = parse_url($item["author-link"]);
if (empty($parts["scheme"]) || empty($parts["host"])) {
throw new HTTPException\InternalServerErrorException();
}
$host = $parts["scheme"] . "://" . $parts["host"];
if (Strings::normaliseLink($host) != Strings::normaliseLink($app->getBaseURL())) {