PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Networking » Net_IPv6 » Bug #2802

compress() doesn't compress correctly

Details

Submitted2004-11-21 23:12 UTC
Fromcmoehrke at netviser dot de
Assignedalexmerz
StatusClosed
PackageNet_IPv6
PHP Version5.0.2
OSSuse Linux 9.0
Roadmaps(Not assigned)

Comments

[2004-11-21 23:12 UTC] cmoehrke at netviser dot de

Description:
------------
RFC 3515 says:
Note that it is not necessary to write the leading zeros in an individual field, but there must be at least one numeral in every field.

That means, that one may use zeros but it is not necessary. But an address like 0000:0000:0000:588:0000:FAEF:1428:57AB is not compressed. Only adresses like 0:0:0:588:0:FAEF:1428:57AB seem to work properly with compress().

Reproduce code:
---------------
require("Net/IPv6.php");
echo Net_IPv6::compress("0000:0000:0000:588:0000:FAEF:1428:57AB");

Expected result:
----------------
::588:0000:FAEF:1428:57AB

Actual result:
--------------
0000:0000:0000:588:0000:FAEF:1428:57AB

[2004-11-23 22:36 UTC] alexmerz at php dot net

Will fix this week

[2004-11-24 23:24 UTC] alexmerz at php dot net

This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.

In case this was a pear.php.net website problem, the change will show
up on the website in short time.

Thank you for the report, and for helping us make PEAR better.

Release will follow