summaryrefslogtreecommitdiff
path: root/classes/urlhelper.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-06-18 11:30:11 +0300
committerAndrew Dolgov <[email protected]>2021-06-18 11:30:11 +0300
commit69f261c41d194f302df8b4cf2d3d8f82b65483f4 (patch)
tree3866ee3b3e163132ce1f9fb0380663075dc6fc6f /classes/urlhelper.php
parente9c062a189cfad71922fc576d636610da18006d4 (diff)
revise previous a little bit
Diffstat (limited to 'classes/urlhelper.php')
-rw-r--r--classes/urlhelper.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/classes/urlhelper.php b/classes/urlhelper.php
index b4545939f..d5fa51dbc 100644
--- a/classes/urlhelper.php
+++ b/classes/urlhelper.php
@@ -31,8 +31,8 @@ class UrlHelper {
*
* @param string $base_url Base URL (i.e. from where the document is)
* @param string $rel_url Possibly relative URL in the document
- * @param string $owner_element Owner node tag name (i.e. A) (optional)
- * @param string $owner_attribute Owner attribute (i.e. href) (optional)
+ * @param string $owner_element Owner element tag name (i.e. "a") (optional)
+ * @param string $owner_attribute Owner attribute (i.e. "href") (optional)
*
* @return string Absolute URL
*/
@@ -47,7 +47,7 @@ class UrlHelper {
} else if (strpos($rel_url, "//") === 0) {
return self::validate("https:" . $rel_url);
// allow some extra schemes for A href
- } else if (in_array($rel_parts["scheme"] ?? "", self::EXTRA_HREF_SCHEMES) &&
+ } else if (in_array($rel_parts["scheme"] ?? "", self::EXTRA_HREF_SCHEMES, true) &&
$owner_element == "a" &&
$owner_attribute == "href") {
return $rel_url;