Browse Source

Work properly without dl() function

Closes #14
tags/0.6
Chris Smith 14 years ago
parent
commit
9045d5df56
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      bigmath.inc.php
  2. 1
    1
      test.php

+ 1
- 1
bigmath.inc.php View File

@@ -198,7 +198,7 @@ abstract class BigMath {
198 198
       }
199 199
 
200 200
       // Try to load dynamic modules.
201
-      if (!$loaded) {
201
+      if (!$loaded && function_exists('dl')) {
202 202
         foreach ($ext['modules'] as $module) {
203 203
           if (@dl($module . "." . PHP_SHLIB_SUFFIX)) {
204 204
             $loaded = true;

+ 1
- 1
test.php View File

@@ -74,7 +74,7 @@
74 74
  foreach ($extensions as $ext) {
75 75
   if ($ext['extension'] && extension_loaded($ext['extension'])) {
76 76
    $loaded = true;
77
-  } else {
77
+  } elseif (function_exists('dl')) {
78 78
    foreach ($ext['modules'] as $module) {
79 79
     if (@dl($module . "." . PHP_SHLIB_SUFFIX)) {
80 80
      $loaded = true;

Loading…
Cancel
Save