Skip to content

Commit

Permalink
[DomCrawler] Revert "bug symfony#52579 UriResolver support path with …
Browse files Browse the repository at this point in the history
…colons"
  • Loading branch information
lyrixx authored and nicolas-grekas committed Nov 17, 2023
1 parent a85ffa9 commit 790fb38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/Symfony/Component/DomCrawler/Tests/UriResolverTest.php
Expand Up @@ -85,9 +85,7 @@ public static function provideResolverTests()
['foo', 'http://localhost?bar=1', 'http://localhost/foo'],
['foo', 'http://localhost#bar', 'http://localhost/foo'],

['foo:1', 'http://localhost', 'http://localhost/foo:1'],
['/bar:1', 'http://localhost', 'http://localhost/bar:1'],
['foo/bar:1', 'http://localhost', 'http://localhost/foo/bar:1'],
['http://', 'http://localhost', 'http://'],
];
}
}
2 changes: 1 addition & 1 deletion src/Symfony/Component/DomCrawler/UriResolver.php
Expand Up @@ -33,7 +33,7 @@ public static function resolve(string $uri, ?string $baseUri): string
$uri = trim($uri);

// absolute URL?
if (\is_string(parse_url($uri, \PHP_URL_SCHEME))) {
if (null !== parse_url($uri, \PHP_URL_SCHEME)) {
return $uri;
}

Expand Down

0 comments on commit 790fb38

Please sign in to comment.