File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ var_dump($uri3->getUserInfo());
16
16
var_dump ($ uri4 ->getUserInfo ());
17
17
var_dump ($ uri4 ->getRawUserInfo ());
18
18
19
+ $ uri1 = Uri \Rfc3986 \Uri::parse ("/foo " );
20
+ $ uri2 = $ uri1 ->withUserInfo (null );
21
+ var_dump ($ uri2 ->getPort ());
22
+
19
23
try {
20
24
$ uri4 ->withUserInfo ("u:s/r " );
21
25
} catch (Uri \InvalidUriException $ e ) {
@@ -35,6 +39,7 @@ string(4) "user"
35
39
NULL
36
40
string(11) "us%2Fr:pass"
37
41
string(13) "%75s%2Fr:pass"
42
+ NULL
38
43
The specified userinfo is malformed
39
44
NULL
40
45
string(9) "user:pass"
Original file line number Diff line number Diff line change @@ -26,12 +26,8 @@ var_dump($uri1->getPort());
26
26
var_dump ($ uri2 ->getPort ());
27
27
28
28
$ uri1 = Uri \Rfc3986 \Uri::parse ("/foo " );
29
-
30
- try {
31
- $ uri1 ->withPort (null ); // TODO should not throw
32
- } catch (Uri \InvalidUriException $ e ) {
33
- echo $ e ->getMessage () . "\n" ;
34
- }
29
+ $ uri2 = $ uri1 ->withPort (null );
30
+ var_dump ($ uri2 ->getPort ());
35
31
36
32
try {
37
33
$ uri1 ->withPort (1 );
@@ -68,7 +64,7 @@ int(443)
68
64
int(8080)
69
65
NULL
70
66
int(80)
71
- The specified port is malformed
67
+ NULL
72
68
The specified port is malformed
73
69
int(8080)
74
70
int(22)
You can’t perform that action at this time.
0 commit comments