]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/OStatus/lib/safemath_biginteger.php
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
[quix0rs-gnu-social.git] / plugins / OStatus / lib / safemath_biginteger.php
1 <?php
2
3 require_once 'Math/BigInteger.php';
4
5 /**
6  * Crypt_RSA stores a Math_BigInteger with value 0, which triggers a bug
7  * in Math_BigInteger's wakeup function which spews notices to log or output.
8  * This wrapper replaces it with a version that survives serialization.
9  */
10 class SafeMath_BigInteger extends Math_BigInteger
11 {
12     function __wakeup()
13     {
14         if ($this->hex == '') {
15             $this->hex = '0';
16         }
17         parent::__wakeup();
18     }
19 }
20