From b5de71c3906573d2654e27e28622abd04d859dc7 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 21 Jun 2019 17:57:26 +0000 Subject: [PATCH] Fix a notice when the author is missing --- src/Module/Diaspora/Fetch.php | 3 +++ 1 file changed, 3 insertions(+) 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())) {