File tree 3 files changed +4
-7
lines changed
3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -94,10 +94,7 @@ public function createFromGlobals(array $globals): Uri
94
94
}
95
95
96
96
// Query string
97
- $ queryString = '' ;
98
- if (isset ($ globals ['QUERY_STRING ' ])) {
99
- $ queryString = $ globals ['QUERY_STRING ' ];
100
- }
97
+ $ queryString = $ globals ['QUERY_STRING ' ] ?? '' ;
101
98
102
99
// Request URI
103
100
$ requestUri = '' ;
Original file line number Diff line number Diff line change @@ -87,8 +87,8 @@ public function __construct(
87
87
$ this ->path = $ this ->filterPath ($ path );
88
88
$ this ->query = $ this ->filterQuery ($ query );
89
89
$ this ->fragment = $ this ->filterFragment ($ fragment );
90
- $ this ->user = $ user ;
91
- $ this ->password = $ password ;
90
+ $ this ->user = $ this -> filterUserInfo ( $ user) ;
91
+ $ this ->password = $ this -> filterUserInfo ( $ password) ;
92
92
}
93
93
94
94
/**
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public function testGetUserInfoWithUsernameAndPasswordEncodesCorrectly()
53
53
{
54
54
$ uri = $ this
55
55
->createUriFactory ()
56
- ->createUri ('https://bob%40example .com:pass%3Aword @example.com:443/foo/bar?abc=123#section3 ' );
56
+ ->createUri ('https://bob@example .com:pass:word @example.com:443/foo/bar?abc=123#section3 ' );
57
57
58
58
$ this ->assertEquals ('bob%40example.com:pass%3Aword ' , $ uri ->getUserInfo ());
59
59
}
You can’t perform that action at this time.
0 commit comments