Req #17438 [Opn->Csd]: Serialisation support in MATH_BIGINTEGER_MODE_GMP

From: Date: Wed, 26 May 2010 21:09:28 +0000
Subject: Req #17438 [Opn->Csd]: Serialisation support in MATH_BIGINTEGER_MODE_GMP
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-3807@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=17438&edit=1 ID: 17438 Updated by: terrafrost@php.net Reported By: pear at marcuscobden dot co dot uk Summary: Serialisation support in MATH_BIGINTEGER_MODE_GMP -Status: Open +Status: Closed Type: Feature/Change Request Package: Math_BigInteger Package Version: 1.0.0RC3 PHP Version: 5.3.1 -Assigned To: +Assigned To: terrafrost Roadmap Versions: New Comment: -Status: Open +Status: Closed -Assigned To: +Assigned To: terrafrost 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: ------------------------------------------------------------------------ [2010-05-26 08:49:24] lethargy Ah brilliant! Thanks. Sorry I filed the second request before you had a chance to respond :P ------------------------------------------------------------------------ [2010-05-26 08:40:11] terrafrost The most recent version of this code isn't currently available at pear.php.net. It's available here: http://phpseclib.cvs.sourceforge.net/viewvc/*checkout*/phpseclib/phpseclib/Math/BigInteger.php I'll try to update the pear SVN and make a release tomorrow. I'll close this report then. ------------------------------------------------------------------------ [2010-05-26 08:20:38] lethargy Description: ------------ If the library is in MATH_BIGINTEGER_MODE_GMP mode, serialization does not function correctly. It might be possible to remedy this in a subclass, if the instance variables were of 'protected' scope, but it is not because they are all 'private'. Test script: --------------- <?php require 'Math/BigInteger.php'; $foo = new Math_BigInteger(20); $data = serialize($foo); $bar = unserialize($data); echo $foo->toString(); echo "\n"; echo $bar->toString(); Expected result: ---------------- 20 20 Actual result: -------------- 20 0 ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=17438&edit=1

« previous php.pear.bugs (#3807) next »