Edit report at http://bugs.php.net/bug.php?id=52803&edit=1

 ID:                 52803
 Updated by:         scott...@php.net
 Reported by:        leif at flattr dot com
 Summary:            parse_url can't handle urls without a scheme.
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            *General Issues
 Operating System:   osx and debian linux
 PHP Version:        5.3.3
 Block user comment: N

 New Comment:

The function is designed to work with a fully qualified URL, does the
manual 

suggest otherwise?


Previous Comments:
------------------------------------------------------------------------
[2010-09-09 18:02:23] leif at flattr dot com

Description:
------------
parse_url will falsely use the hostname as path if url doesn't include
the scheme part.







Test script:
---------------
php > echo var_dump(parse_url('hejhopp.com/'));



Expected result:
----------------
array(1) {

  ["host"]=>

  string(11) "hejhopp.com"

  ["path"]=>

  string(1) "/"

}

Actual result:
--------------
array(1) {

  ["path"]=>

  string(12) "hejhopp.com/"

}


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52803&edit=1

Reply via email to