diff options
author | Josh Hoyt <josh@janrain.com> | 2006-01-06 22:45:39 +0000 |
---|---|---|
committer | Josh Hoyt <josh@janrain.com> | 2006-01-06 22:45:39 +0000 |
commit | af126ad987dc799762ea32f4ceabfee9847d3839 (patch) | |
tree | 7ee506181dc171170776c828c5d95190a6c2de24 /Net/OpenID/CryptUtil.php | |
parent | 195d91c8704a726526dd3c34260c17575ff001f0 (diff) | |
download | php-openid-af126ad987dc799762ea32f4ceabfee9847d3839.zip php-openid-af126ad987dc799762ea32f4ceabfee9847d3839.tar.gz php-openid-af126ad987dc799762ea32f4ceabfee9847d3839.tar.bz2 |
[project @ Fix MathLibrary::getLibWrapper for no lib case]
Diffstat (limited to 'Net/OpenID/CryptUtil.php')
-rw-r--r-- | Net/OpenID/CryptUtil.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Net/OpenID/CryptUtil.php b/Net/OpenID/CryptUtil.php index d54de10..a94ce24 100644 --- a/Net/OpenID/CryptUtil.php +++ b/Net/OpenID/CryptUtil.php @@ -624,7 +624,7 @@ class Net_OpenID_GmpMathWrapper extends Net_OpenID_MathWrapper { } } -$Net_OpenID___mathLibrary = null; +$_Net_OpenID___mathLibrary = null; /** * Define the supported extensions. An extension array has keys @@ -677,17 +677,18 @@ class Net_OpenID_MathLibrary { */ function &getLibWrapper() { - if (defined('Net_OpenID_NO_MATH_SUPPORT')) { - return null; - } - - global $_Net_OpenID_supported_extensions; - // The instance of Net_OpenID_MathWrapper that we choose to // supply will be stored here, so that subseqent calls to this // method will return a reference to the same object. global $_Net_OpenID___mathLibrary; + if (defined('Net_OpenID_NO_MATH_SUPPORT')) { + $_Net_OpenID___mathLibrary = null; + return $_Net_OpenID___mathLibrary; + } + + global $_Net_OpenID_supported_extensions; + // If this method has not been called before, look at // $Net_OpenID_supported_extensions and try to find an // extension that works. |