|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-05-25 17:10 UTC] iliaa@php.net
[2005-05-25 19:03 UTC] moriyoshi@php.net
[2005-05-25 20:49 UTC] iliaa@php.net
[2005-05-25 21:02 UTC] moriyoshi@php.net
[2005-05-25 23:38 UTC] iliaa@php.net
[2005-05-26 05:57 UTC] iliaa@php.net
[2005-05-27 15:28 UTC] moriyoshi@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 19:00:01 2025 UTC |
Description: ------------ parse_url() cannot handle relative URIs (ones without schemes) that contains ':' within the queries. Reproduce code: --------------- var_dump(parse_url('/a/b/c')); var_dump(parse_url('/a/b/c?d:')); var_dump(parse_url('/a/b/c?d:e')); Expected result: ---------------- array(1) { ["path"]=> string(6) "/a/b/c" } array(2) { ["path"]=> string(6) "/a/b/c" ["query"]=> string(6) "d:" } array(2) { ["path"]=> string(6) "/a/b/c" ["query"]=> string(6) "d:e" } Actual result: -------------- array(1) { ["path"]=> string(6) "/a/b/c" } Warning: parse_url(/a/b/c?d:): Unable to parse url in Command line code on line 2 bool(false) array(2) { ["scheme"]=> string(8) "/a/b/c?d" ["path"]=> string(1) "e" }