Skip to content

Commit 89009aa

Browse files
vdauchynicolas-grekas
authored andcommitted
[DomCrawler] UriResolver support path with columns
1 parent 0a30c9b commit 89009aa

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Symfony/Component/DomCrawler/Tests/UriResolverTest.php

+4
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ public static function provideResolverTests()
8484

8585
['foo', 'http://localhost?bar=1', 'http://localhost/foo'],
8686
['foo', 'http://localhost#bar', 'http://localhost/foo'],
87+
88+
['foo:1', 'http://localhost', 'http://localhost/foo:1'],
89+
['/bar:1', 'http://localhost', 'http://localhost/bar:1'],
90+
['foo/bar:1', 'http://localhost', 'http://localhost/foo/bar:1'],
8791
];
8892
}
8993
}

src/Symfony/Component/DomCrawler/UriResolver.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static function resolve(string $uri, ?string $baseUri): string
3333
$uri = trim($uri);
3434

3535
// absolute URL?
36-
if (null !== parse_url($uri, \PHP_URL_SCHEME)) {
36+
if (\is_string(parse_url($uri, \PHP_URL_SCHEME))) {
3737
return $uri;
3838
}
3939

0 commit comments

Comments
 (0)