]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - extlib/Auth/OpenID/BigMath.php
Merge remote-tracking branch 'upstream/master'
[quix0rs-gnu-social.git] / extlib / Auth / OpenID / BigMath.php
index b5fc627a096cee6247daaf495b2d9b1e29d86e61..58b46bf27b24bdfdf39225a3f19a3ea025e355d4 100644 (file)
@@ -351,8 +351,7 @@ function Auth_OpenID_math_extensions()
                   'class' => 'Auth_OpenID_GmpMathWrapper');
     }
 
-    $result[] = array(
-                      'modules' => array('bcmath', 'php_bcmath'),
+    $result[] = array('modules' => array('bcmath', 'php_bcmath'),
                       'extension' => 'bcmath',
                       'class' => 'Auth_OpenID_BcMathWrapper');
 
@@ -367,26 +366,7 @@ function Auth_OpenID_detectMathLibrary($exts)
     $loaded = false;
 
     foreach ($exts as $extension) {
-        // See if the extension specified is already loaded.
-        if ($extension['extension'] &&
-            extension_loaded($extension['extension'])) {
-            $loaded = true;
-        }
-
-        // Try to load dynamic modules.
-        if (!$loaded) {
-            foreach ($extension['modules'] as $module) {
-                if (function_exists('dl') && ini_get('enable_dl') && !ini_get('safe_mode') && @dl($module . "." . PHP_SHLIB_SUFFIX)) {
-                    $loaded = true;
-                    break;
-                }
-            }
-        }
-
-        // If the load succeeded, supply an instance of
-        // Auth_OpenID_MathWrapper which wraps the specified
-        // module's functionality.
-        if ($loaded) {
+        if (extension_loaded($extension['extension'])) {
             return $extension;
         }
     }
@@ -405,7 +385,7 @@ function Auth_OpenID_detectMathLibrary($exts)
  * instance of a wrapper for that extension module.  If no extension
  * module is found, an instance of {@link Auth_OpenID_MathWrapper} is
  * returned, which wraps the native PHP integer implementation.  The
- * proper calling convention for this method is $lib =&
+ * proper calling convention for this method is $lib =
  * Auth_OpenID_getMathLib().
  *
  * This function checks for the existence of specific long number
@@ -416,7 +396,7 @@ function Auth_OpenID_detectMathLibrary($exts)
  *
  * @package OpenID
  */
-function &Auth_OpenID_getMathLib()
+function Auth_OpenID_getMathLib()
 {
     // The instance of Auth_OpenID_MathWrapper that we choose to
     // supply will be stored here, so that subseqent calls to this
@@ -468,4 +448,4 @@ function Auth_OpenID_noMathSupport()
     return defined('Auth_OpenID_NO_MATH_SUPPORT');
 }
 
-?>
+