Skip to content

Commit dc2f02e

Browse files
committed
fixed url scheme check
1 parent 0641d4a commit dc2f02e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Url.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ function ($matches) {
654654
throw new \InvalidArgumentException('Malformed URL: ' . $url);
655655
}
656656

657-
if (empty($parts['scheme']) || !in_array($parts['scheme'], ['http', 'https'])) {
657+
if (!empty($parts['scheme']) && !in_array($parts['scheme'], ['http', 'https'])) {
658658
throw new \InvalidArgumentException(sprintf('Invalid URL scheme: "%s"', $parts['scheme']));
659659
}
660660

0 commit comments

Comments
 (0)