From: Michael Date: Fri, 21 Jun 2019 17:57:26 +0000 (+0000) Subject: Fix a notice when the author is missing X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b5de71c3906573d2654e27e28622abd04d859dc7;p=friendica.git Fix a notice when the author is missing --- diff --git a/src/Module/Diaspora/Fetch.php b/src/Module/Diaspora/Fetch.php index bcb33e3359..467d64566b 100644 --- a/src/Module/Diaspora/Fetch.php +++ b/src/Module/Diaspora/Fetch.php @@ -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())) {