|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-08-17 09:22 UTC] phpqa at sebastianmendel dot de
Description:
------------
parse_url() does not recognize '//' as scheme to host separator and therefor does
not recognize exemple.org as host in URL "//example.org"
Test script:
---------------
var_dump(parse_url('//example.org'));
Expected result:
----------------
array(1) {
'host' =>
string(11) "example.org"
}
Actual result:
--------------
array(1) {
'path' =>
string(14) "//example.org"
}
Patchesparse_url_relative_scheme2 (last revision 2012-08-19 23:31 UTC by ajf at ajf dot me)parse_url_relative_scheme (last revision 2012-08-19 23:10 UTC by ajf at ajf dot me) Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 21:00:01 2025 UTC |
There is a problem when having @ before the (empty) hostname, the "try best as possible" is gone then since 5.4.7 (when this 62844 fix was introduced): echo print_r(parse_url('//site@/path/to/file.css?query')); not parsing any path nor other parts any longer - it did before. the fix has somewhat broken this. http://3v4l.org/mhsO7 Also why do you introduce a backwards incompatible change in a minor revision?