Edit report at https://bugs.php.net/bug.php?id=55399&edit=1
ID: 55399 Updated by: il...@php.net Reported by: chris at gedrim dot co dot uk Summary: parse_url() returning inccorrect value -Status: Assigned +Status: Closed Type: Bug Package: URL related Operating System: Windows 7 Professional x64 PHP Version: 5.3.6 Assigned To: iliaa Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2011-08-11 13:01:48] il...@php.net Automatic comment from SVN on behalf of iliaa Revision: http://svn.php.net/viewvc/?view=revision&revision=314783 Log: Fixed bug #55399 (parse_url() incorrectly treats ':' as a valid path) ------------------------------------------------------------------------ [2011-08-11 11:39:26] larue...@php.net in php 5.3.6 , url.c line 188 added a condition if (pp - p > 0 && pp - p < 6 && (*pp == '/' || *pp == '\0')) ... "pp-p >0" which make the whole flow changed then result a valid ret->path return, hope this could be a help :P ------------------------------------------------------------------------ [2011-08-11 11:08:55] chris at gedrim dot co dot uk Description: ------------ parse_url() in 5.3.5 would return false when called with ':' (malformed url). When called with ':' in 5.3.6 parse_url() returns: array ( 'path' => ':', ) Test script: --------------- var_dump(parse_url(':')); Expected result: ---------------- bool(false) Actual result: -------------- array(1) { ["path"]=> string(1) ":" } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55399&edit=1