php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #81543
Patch HcPcEgmp revision 2021-10-31 04:13 UTC by sample at email dot tst
revision 2021-10-31 04:13 UTC by sample at email dot tst
revision 2021-10-31 04:13 UTC by sample at email dot tst
revision 2021-10-31 04:13 UTC by sample at email dot tst
revision 2021-10-31 04:13 UTC by sample at email dot tst
revision 2021-10-31 04:13 UTC by sample at email dot tst
revision 2021-10-31 04:13 UTC by sample at email dot tst
revision 2021-10-31 04:13 UTC by sample at email dot tst
revision 2021-10-31 04:12 UTC by sample at email dot tst
revision 2021-10-31 04:12 UTC by sample at email dot tst
revision 2021-10-31 04:12 UTC by sample at email dot tst
revision 2021-10-31 04:12 UTC by sample at email dot tst
revision 2021-10-31 04:12 UTC by sample at email dot tst
Patch parse_url_windows_paths revision 2021-10-19 19:41 UTC by ppchelko at wikimedia dot org

Patch parse_url_windows_paths for *URL Functions Bug #81543

Patch version 2021-10-19 19:41 UTC

Return to Bug #81543 | Download this patch
Patch Revisions:

Developer: ppchelko@wikimedia.org

diff --git a/ext/standard/tests/url/parse_url_basic_001.phpt b/ext/standard/tests/url/parse_url_basic_001.phpt
index f3abd703b2..66e8c0ff88 100644
--- a/ext/standard/tests/url/parse_url_basic_001.phpt
+++ b/ext/standard/tests/url/parse_url_basic_001.phpt
@@ -806,7 +806,7 @@ echo "Done";
   ["scheme"]=>
   string(4) "file"
   ["path"]=>
-  string(3) "a:/"
+  string(4) "/a:/"
 }
 
 --> file:///ab:/: array(2) {
@@ -820,14 +820,14 @@ echo "Done";
   ["scheme"]=>
   string(4) "file"
   ["path"]=>
-  string(3) "a:/"
+  string(4) "/a:/"
 }
 
 --> file:///@:/: array(2) {
   ["scheme"]=>
   string(4) "file"
   ["path"]=>
-  string(3) "@:/"
+  string(4) "/@:/"
 }
 
 --> file:///:80/: array(2) {
diff --git a/ext/standard/tests/url/parse_url_basic_007.phpt b/ext/standard/tests/url/parse_url_basic_007.phpt
index 8d7de1d0fb..6ae826140e 100644
--- a/ext/standard/tests/url/parse_url_basic_007.phpt
+++ b/ext/standard/tests/url/parse_url_basic_007.phpt
@@ -95,10 +95,10 @@ echo "Done";
 --> http://?:/   : bool(false)
 --> http://@?:/   : bool(false)
 --> file:///:   : string(2) "/:"
---> file:///a:/   : string(3) "a:/"
+--> file:///a:/   : string(4) "/a:/"
 --> file:///ab:/   : string(5) "/ab:/"
---> file:///a:/   : string(3) "a:/"
---> file:///@:/   : string(3) "@:/"
+--> file:///a:/   : string(4) "/a:/"
+--> file:///@:/   : string(4) "/@:/"
 --> file:///:80/   : string(5) "/:80/"
 --> []   : string(2) "[]"
 --> http://[x:80]/   : string(1) "/"
diff --git a/ext/standard/url.c b/ext/standard/url.c
index e3d95768fb..96212b5cd2 100644
--- a/ext/standard/url.c
+++ b/ext/standard/url.c
@@ -170,9 +170,6 @@ PHPAPI php_url *php_url_parse_ex2(char const *str, size_t length, bool *has_port
 						/* support windows drive letters as in:
 						   file:///c:/somedir/file.txt
 						*/
-						if (e + 5 < ue && *(e + 5) == ':') {
-							s = e + 4;
-						}
 						goto just_path;
 					}
 				}
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 05:01:33 2024 UTC