diff --git a/Sources/Url.php b/Sources/Url.php index ae3421dfe3..11477ecadd 100644 --- a/Sources/Url.php +++ b/Sources/Url.php @@ -605,7 +605,15 @@ public function isWebsite(): bool */ public function isScheme(string|array $scheme): bool { - return !empty($this->scheme) && \in_array($this->scheme, array_map('strval', (array) $scheme)); + if (empty($this->scheme)) { + return false; + } + + return \in_array( + strtolower($this->scheme), + array_map(fn($s) => strtolower((string) $s), (array) $scheme), + true, + ); } /**