Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1c46c91

Browse files
committed
Merge branch '7.1' into 7.2
* 7.1: fix merge [Intl] Update ICU data from 74.1 to 75.1 use DeprecatedCallableInfo for Twig callables if possible [Filesystem] Add a warning about `chown()` and `chgrp()` on Windows [String] Update wcswidth data with Unicode 16 PhpSubprocess: Add flag PREG_OFFSET_CAPTURE to preg_match to identify the offset Work around parse_url() bug [Ldap] Clean `ldap_connect()` call in `LdapTestCase` [HttpFoundation] Update links for X-Accel-Redirect and fail properly when X-Accel-Mapping is missing
2 parents01a9a22 +b92af23 commit1c46c91

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

‎Tests/UriResolverTest.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public static function provideResolverTests()
8686
['foo','http://localhost#bar','http://localhost/foo'],
8787

8888
['http://','http://localhost','http://'],
89+
['/foo:123','http://localhost','http://localhost/foo:123'],
8990
];
9091
}
9192
}

‎UriResolver.php‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ public static function resolve(string $uri, ?string $baseUri): string
3232
{
3333
$uri =trim($uri);
3434

35+
if (false === ($scheme =parse_url($uri, \PHP_URL_SCHEME)) &&'/' === ($uri[0] ??'')) {
36+
$scheme =parse_url($uri.'#', \PHP_URL_SCHEME);
37+
}
38+
3539
// absolute URL?
36-
if (null !==parse_url($uri, \PHP_URL_SCHEME)) {
40+
if (null !==$scheme) {
3741
return$uri;
3842
}
3943

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp