From 168dc6fe575d2734ce2c1a93f198262f39ac81c7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 18 Feb 2022 16:44:03 +0300 Subject: [PATCH] rewrite_relative: prevent php warning when checking for unset content type in EXTRA_SCHEMES_BY_CONTENT_TYPE --- classes/urlhelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/urlhelper.php b/classes/urlhelper.php index 22fe067d5..2dfb22a5d 100644 --- a/classes/urlhelper.php +++ b/classes/urlhelper.php @@ -92,7 +92,7 @@ class UrlHelper { return $rel_url; // allow some extra schemes for links with feed-specified content type i.e. enclosures } else if ($content_type && - is_array(self::EXTRA_SCHEMES_BY_CONTENT_TYPE[$content_type]) && + isset(self::EXTRA_SCHEMES_BY_CONTENT_TYPE[$content_type]) && in_array($rel_parts["scheme"], self::EXTRA_SCHEMES_BY_CONTENT_TYPE[$content_type])) { return $rel_url; // allow limited subset of inline base64-encoded images for IMG elements