Skip to content

Commit c0f8cc1

Browse files
committed
Merge branch 'PHP-7.4' into master
* PHP-7.4: Fix #80114: parse_url does not accept URLs with port 0
2 parents 93745a2 + 105132b commit c0f8cc1

12 files changed

+33
-4
lines changed

ext/standard/tests/url/parse_url_basic_001.phpt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,15 @@ echo "Done";
873873
string(3) "%:x"
874874
}
875875

876+
--> https://example.com:0/: array(3) {
877+
["scheme"]=>
878+
string(5) "https"
879+
["host"]=>
880+
string(11) "example.com"
881+
["path"]=>
882+
string(1) "/"
883+
}
884+
876885
--> http:///blah.com: bool(false)
877886

878887
--> http://:80: bool(false)

ext/standard/tests/url/parse_url_basic_002.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ echo "Done";
107107
--> / : NULL
108108
--> /rest/Users?filter={"id":"123"} : NULL
109109
--> %:x : NULL
110+
--> https://example.com:0/ : string(5) "https"
110111
--> http:///blah.com : bool(false)
111112
--> http://:80 : bool(false)
112113
--> http://user@:80 : bool(false)

ext/standard/tests/url/parse_url_basic_003.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ echo "Done";
106106
--> / : NULL
107107
--> /rest/Users?filter={"id":"123"} : NULL
108108
--> %:x : NULL
109+
--> https://example.com:0/ : string(11) "example.com"
109110
--> http:///blah.com : bool(false)
110111
--> http://:80 : bool(false)
111112
--> http://user@:80 : bool(false)

ext/standard/tests/url/parse_url_basic_004.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ echo "Done";
106106
--> / : NULL
107107
--> /rest/Users?filter={"id":"123"} : NULL
108108
--> %:x : NULL
109+
--> https://example.com:0/ : NULL
109110
--> http:///blah.com : bool(false)
110111
--> http://:80 : bool(false)
111112
--> http://user@:80 : bool(false)

ext/standard/tests/url/parse_url_basic_005.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ echo "Done";
106106
--> / : NULL
107107
--> /rest/Users?filter={"id":"123"} : NULL
108108
--> %:x : NULL
109+
--> https://example.com:0/ : NULL
109110
--> http:///blah.com : bool(false)
110111
--> http://:80 : bool(false)
111112
--> http://user@:80 : bool(false)

ext/standard/tests/url/parse_url_basic_006.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ echo "Done";
106106
--> / : NULL
107107
--> /rest/Users?filter={"id":"123"} : NULL
108108
--> %:x : NULL
109+
--> https://example.com:0/ : NULL
109110
--> http:///blah.com : bool(false)
110111
--> http://:80 : bool(false)
111112
--> http://user@:80 : bool(false)

ext/standard/tests/url/parse_url_basic_007.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ echo "Done";
106106
--> / : string(1) "/"
107107
--> /rest/Users?filter={"id":"123"} : string(11) "/rest/Users"
108108
--> %:x : string(3) "%:x"
109+
--> https://example.com:0/ : string(1) "/"
109110
--> http:///blah.com : bool(false)
110111
--> http://:80 : bool(false)
111112
--> http://user@:80 : bool(false)

ext/standard/tests/url/parse_url_basic_008.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ echo "Done";
106106
--> / : NULL
107107
--> /rest/Users?filter={"id":"123"} : string(19) "filter={"id":"123"}"
108108
--> %:x : NULL
109+
--> https://example.com:0/ : NULL
109110
--> http:///blah.com : bool(false)
110111
--> http://:80 : bool(false)
111112
--> http://user@:80 : bool(false)

ext/standard/tests/url/parse_url_basic_009.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ echo "Done";
106106
--> / : NULL
107107
--> /rest/Users?filter={"id":"123"} : NULL
108108
--> %:x : NULL
109+
--> https://example.com:0/ : NULL
109110
--> http:///blah.com : bool(false)
110111
--> http://:80 : bool(false)
111112
--> http://user@:80 : bool(false)

ext/standard/tests/url/parse_url_unterminated.phpt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,15 @@ echo "Done";
881881
string(3) "%:x"
882882
}
883883

884+
--> https://example.com:0/: array(3) {
885+
["scheme"]=>
886+
string(5) "https"
887+
["host"]=>
888+
string(11) "example.com"
889+
["path"]=>
890+
string(1) "/"
891+
}
892+
884893
--> http:///blah.com: bool(false)
885894

886895
--> http://:80: bool(false)

0 commit comments

Comments
 (0)