PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Networking » Net_URL » Bug #1906

Constructor can't handle &

Details

Submitted2004-07-18 12:35 UTC
Fromandbe611 at student dot liu dot se
StatusBogus
PackageNet_URL
PHP Version4.3.4
OSAll
Roadmaps(Not assigned)

Comments

[2004-07-18 12:35 UTC] andbe611 at student dot liu dot se

Description:
------------
If you pass the constructor an url thas uses & as argument separator instead of & the call to getUrl()returns an incorrect url.

Reproduce code:
---------------
<?php
require_once "Net/URL.php";
$u = new Net_Url("http://example.com?var1=frog&var2=dog");
print $u->getUrl();

?>

Expected result:
----------------
http://example.com?var1=frog&var2=dog

Actual result:
--------------
http://example.com?var1=frog&amp;var2=dog