Bug #78997 [NEW]: PHP parse_url incorrect
| From: | dinhbaouit at gmail dot com | Date: | Thu, 19 Dec 2019 09:51:15 +0000 |
| Subject: | Bug #78997 [NEW]: PHP parse_url incorrect | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-224405@lists.php.net to get a copy of this message | ||
From: dinhbaouit at gmail dot com
Operating system: ubuntu
PHP version: 7.2.26
Package: *General Issues
Bug Type: Bug
Bug description:PHP parse_url incorrect
Description:
------------
In PHP <7.2.26 when using parse_url "host:port?query" the result return
incorrect
Test script:
---------------
<?php
var_dump(parse_url("localhost:80?a=1"));
?>
Expected result:
----------------
php > var_dump(parse_url("localhost:80?a=1"));
array(3) {
["host"]=>
string(9) "localhost"
["port"]=>
string(2) "80"
["query"]=>
string(3) "a=1"
}
Actual result:
--------------
php > var_dump(parse_url("localhost:80?a=1"));
array(3) {
["scheme"]=>
string(9) "localhost"
["path"]=>
string(2) "80"
["query"]=>
string(3) "a=1"
}
--
Edit bug report at https://bugs.php.net/bug.php?id=78997&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=78997&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78997&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78997&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78997&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78997&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78997&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78997&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78997&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78997&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78997&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78997&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=78997&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78997&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78997&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78997&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78997&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78997&r=mysqlcfg