From 2c32429d8d42995711728c7a6ee2967dc4989f70 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 29 Jul 2022 14:56:40 +0000 Subject: [PATCH] Fix test --- src/Model/Item.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index a465e8c93c..e0ca507174 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2945,9 +2945,13 @@ class Item { // Make sure that for example site parameters aren't used when testing if the link is contained in the body $urlparts = parse_url($url); - unset($urlparts['query']); - unset($urlparts['fragment']); - $url = Uri::fromParts($urlparts); + if (!empty($urlparts)) { + unset($urlparts['query']); + unset($urlparts['fragment']); + $url = Uri::fromParts($urlparts); + } else { + return false; + } // Remove media links to only search in embedded content // @todo Check images for image link, audio for audio links, ...