#34831 [Opn->Bgs]: parse_url behavior changed from 5.0.4 to 5.0.5 breaks code
| From: | tony2001@php.net | Date: | Tue, 11 Oct 2005 15:36:47 +0000 |
| Subject: | #34831 [Opn->Bgs]: parse_url behavior changed from 5.0.4 to 5.0.5 breaks code | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-86414@lists.php.net to get a copy of this message | ||
ID: 34831
Updated by: tony2001@php.net
Reported By: jason at eblasterpro dot com
-Status: Open
+Status: Bogus
Bug Type: URL related
Operating System: Mandrake 10.2
PHP Version: 5.0.5
New Comment:
'href="http://mysite.com' is not a correct URL,
nobody told you that
parse_url() will behave in the same way with invalid URLs.
No bug here.
Previous Comments:
------------------------------------------------------------------------
[2005-10-11 17:26:03] jason at eblasterpro dot com
Description:
------------
results differ from php-5.0.4 to php-5.0.5 for parse_url with host and
scheme replaced with host and path
Reproduce code:
---------------
example of problem
php-5.0.4:
print_r(parse_url('href="http://mysite.com'));
results:
url = Array[2]
--->host= mysite.com
--->scheme= href="http
php-5.0.5:
print_r(parse_url('href="http://mysite.com'));
results:
url = Array[2]
--->host= href="http
--->path= //mysite.com
Expected result:
----------------
the returned result should not change between versions the correct
return should be
url = Array[2]
--->host= mysite.com
--->scheme= href="http
Actual result:
--------------
the incorrect result
url = Array[2]
--->host= href="http
--->path= //mysite.com
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34831&edit=1