mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-07-15 21:31:36 +03:00
URLs: Fixed issue in comparisons when elements missing
This commit is contained in:
@@ -18,9 +18,9 @@ class UrlComparison
|
||||
$aParts = parse_url($this->a);
|
||||
$bParts = parse_url($this->b);
|
||||
|
||||
return $aParts['host'] === $bParts['host']
|
||||
&& $aParts['scheme'] === $bParts['scheme']
|
||||
&& $aParts['port'] === $bParts['port'];
|
||||
return ($aParts['host'] ?? '') === ($bParts['host'] ?? '')
|
||||
&& ($aParts['scheme'] ?? '') === ($bParts['scheme'] ?? '')
|
||||
&& ($aParts['port'] ?? '') === ($bParts['port'] ?? '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user