| Newsgroups |
php.pear.bugs |
| Message-ID |
<[email protected]> |
Edit report at https://pear.php.net/bugs/bug.php?id=20420&edit=1
ID: 20420
Comment by: [email protected]
Reported By: jan dot prachar at gmail dot com
Summary: Inconsistent setAuthority and getAuthority
Status: Closed
Type: Bug
Package: Net_URL2
Package Version: 2.0.7
PHP Version: Irrelevant
Assigned To: tkli
Roadmap Versions:
New Comment:
btw now you can remove lines 702-704
https://github.com/pear/Net_URL2/blob/master/Net/URL2.php#L702
Previous Comments:
------------------------------------------------------------------------
[2014-10-08 01:55:38] tkli
-Status: Assigned
+Status: Closed
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pear.php.net/get/
------------------------------------------------------------------------
[2014-10-07 18:30:30] tkli
-Assigned To:
+Assigned To: tkli
authority is kept as a compound field of _userinfo, _host and _port.
setting it to an zero-length string is the same as setting the host to a
zero-length string.
it will unset (empty) _userinfo and _port then, too.
this fixes your reported issue.
it will be fixed in the next release.
------------------------------------------------------------------------
[2014-10-02 23:44:54] pracj3am
Description:
------------
There is difference between no authority (e.g. relative URI) and empty
authority.
Test script:
---------------
$url = new Net_URL2('');
$url->setAuthority('');
var_dump($url->getAuthority());
Expected result:
----------------
string(0) ""
Actual result:
--------------
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=20420&edit=1