Skip to content

Commit 105132b

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix #80114: parse_url does not accept URLs with port 0
2 parents 9d1c7f8 + 81b2f3e commit 105132b

13 files changed

+36
-4
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ PHP NEWS
1515
- PCRE:
1616
. Updated to PCRE 10.35. (cmb)
1717

18+
- Standard:
19+
. Fixed bug #80114 (parse_url does not accept URLs with port 0). (cmb, twosee)
20+
1821
01 Oct 2020, PHP 7.4.11
1922

2023
- Core:

ext/standard/tests/url/parse_url_basic_001.phpt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,15 @@ echo "Done";
859859
string(3) "%:x"
860860
}
861861

862+
--> https://example.com:0/: array(3) {
863+
["scheme"]=>
864+
string(5) "https"
865+
["host"]=>
866+
string(11) "example.com"
867+
["path"]=>
868+
string(1) "/"
869+
}
870+
862871
--> http:///blah.com: bool(false)
863872

864873
--> 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
@@ -113,6 +113,7 @@ echo "Done";
113113
--> / : NULL
114114
--> /rest/Users?filter={"id":"123"} : NULL
115115
--> %:x : NULL
116+
--> https://example.com:0/ : string(5) "https"
116117
--> http:///blah.com : bool(false)
117118
--> http://:80 : bool(false)
118119
--> 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
@@ -112,6 +112,7 @@ echo "Done";
112112
--> / : NULL
113113
--> /rest/Users?filter={"id":"123"} : NULL
114114
--> %:x : NULL
115+
--> https://example.com:0/ : string(11) "example.com"
115116
--> http:///blah.com : bool(false)
116117
--> http://:80 : bool(false)
117118
--> 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
@@ -112,6 +112,7 @@ echo "Done";
112112
--> / : NULL
113113
--> /rest/Users?filter={"id":"123"} : NULL
114114
--> %:x : NULL
115+
--> https://example.com:0/ : NULL
115116
--> http:///blah.com : bool(false)
116117
--> http://:80 : bool(false)
117118
--> 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
@@ -112,6 +112,7 @@ echo "Done";
112112
--> / : NULL
113113
--> /rest/Users?filter={"id":"123"} : NULL
114114
--> %:x : NULL
115+
--> https://example.com:0/ : NULL
115116
--> http:///blah.com : bool(false)
116117
--> http://:80 : bool(false)
117118
--> 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
@@ -112,6 +112,7 @@ echo "Done";
112112
--> / : NULL
113113
--> /rest/Users?filter={"id":"123"} : NULL
114114
--> %:x : NULL
115+
--> https://example.com:0/ : NULL
115116
--> http:///blah.com : bool(false)
116117
--> http://:80 : bool(false)
117118
--> 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
@@ -112,6 +112,7 @@ echo "Done";
112112
--> / : string(1) "/"
113113
--> /rest/Users?filter={"id":"123"} : string(11) "/rest/Users"
114114
--> %:x : string(3) "%:x"
115+
--> https://example.com:0/ : string(1) "/"
115116
--> http:///blah.com : bool(false)
116117
--> http://:80 : bool(false)
117118
--> 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
@@ -112,6 +112,7 @@ echo "Done";
112112
--> / : NULL
113113
--> /rest/Users?filter={"id":"123"} : string(19) "filter={"id":"123"}"
114114
--> %:x : NULL
115+
--> https://example.com:0/ : NULL
115116
--> http:///blah.com : bool(false)
116117
--> http://:80 : bool(false)
117118
--> 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
@@ -112,6 +112,7 @@ echo "Done";
112112
--> / : NULL
113113
--> /rest/Users?filter={"id":"123"} : NULL
114114
--> %:x : NULL
115+
--> https://example.com:0/ : NULL
115116
--> http:///blah.com : bool(false)
116117
--> http://:80 : bool(false)
117118
--> http://user@:80 : bool(false)

0 commit comments

Comments
 (0)