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());
1616var_dump ($ uri4 ->getUserInfo ());
1717var_dump ($ uri4 ->getRawUserInfo ());
1818
19+ $ uri1 = Uri \Rfc3986 \Uri::parse ("/foo " );
20+ $ uri2 = $ uri1 ->withUserInfo (null );
21+ var_dump ($ uri2 ->getPort ());
22+
1923try {
2024 $ uri4 ->withUserInfo ("u:s/r " );
2125} catch (Uri \InvalidUriException $ e ) {
@@ -35,6 +39,7 @@ string(4) "user"
3539NULL
3640string(11) "us%2Fr:pass"
3741string(13) "%75s%2Fr:pass"
42+ NULL
3843The specified userinfo is malformed
3944NULL
4045string(9) "user:pass"
Original file line number Diff line number Diff line change @@ -26,12 +26,8 @@ var_dump($uri1->getPort());
2626var_dump ($ uri2 ->getPort ());
2727
2828$ 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 ());
3531
3632try {
3733 $ uri1 ->withPort (1 );
@@ -68,7 +64,7 @@ int(443)
6864int(8080)
6965NULL
7066int(80)
71- The specified port is malformed
67+ NULL
7268The specified port is malformed
7369int(8080)
7470int(22)
You can’t perform that action at this time.
0 commit comments