summaryrefslogtreecommitdiffstats
path: root/Net/OpenID/CryptUtil.php
diff options
context:
space:
mode:
authorJosh Hoyt <josh@janrain.com>2006-01-06 01:39:43 +0000
committerJosh Hoyt <josh@janrain.com>2006-01-06 01:39:43 +0000
commitba2ca3d6b9abf29123aff36183c860c4dd57fa63 (patch)
tree8b71d98c8b666337658066dfb892edb10720455d /Net/OpenID/CryptUtil.php
parent4b5be61d4ee37b4b2bee464a3f02b82b2caf1a41 (diff)
downloadphp-openid-ba2ca3d6b9abf29123aff36183c860c4dd57fa63.zip
php-openid-ba2ca3d6b9abf29123aff36183c860c4dd57fa63.tar.gz
php-openid-ba2ca3d6b9abf29123aff36183c860c4dd57fa63.tar.bz2
[project @ Do not instantiate a dumb math library so that it will not get used by accident]
Diffstat (limited to 'Net/OpenID/CryptUtil.php')
-rw-r--r--Net/OpenID/CryptUtil.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/Net/OpenID/CryptUtil.php b/Net/OpenID/CryptUtil.php
index b868985..fa32a40 100644
--- a/Net/OpenID/CryptUtil.php
+++ b/Net/OpenID/CryptUtil.php
@@ -673,8 +673,11 @@ class Net_OpenID_MathLibrary {
// extension that works.
if (!$Net_OpenID___mathLibrary) {
$loaded = false;
+ $tried = array();
foreach ($Net_OpenID_supported_extensions as $extension) {
+ $tried[] = $extension;
+
// See if the extension specified is already loaded.
if ($extension['extension'] &&
extension_loaded($extension['extension'])) {
@@ -705,7 +708,9 @@ class Net_OpenID_MathLibrary {
// Net_OpenID_MathWrapper so at least some platform-size
// math can be performed.
if (!$Net_OpenID___mathLibrary) {
- $Net_OpenID___mathLibrary = new Net_OpenID_MathWrapper();
+ $triedstr = implode(", ", $tried);
+ $msg = 'This PHP has no math library. tried: ' . $triedstr;
+ trigger_error($msg, E_USER_ERROR);
}
}