[PEAR-BUG] Bug #20420 [Asn->Csd]: Inconsistent setAuthority and getAuthority
[email protected] Wed, 8 Oct 2014 01:55:38 +0100 (BST)
| Newsgroups | php.pear.bugs |
|---|---|
| Message-ID | <[email protected]> |
Edit report at https://pear.php.net/bugs/bug.php?id=20420&edit=1 ID: 20420 Updated by: [email protected] Reported By: jan dot prachar at gmail dot com Summary: Inconsistent setAuthority and getAuthority -Status: Assigned +Status: Closed Type: Bug Package: Net_URL2 Package Version: 2.0.7 PHP Version: Irrelevant Assigned To: tkli Roadmap Versions: New Comment: -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/ Previous Comments: ------------------------------------------------------------------------ [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