]> granicus.if.org Git - php/commitdiff
Use the new PEAR::loadExtension() in checkExtension() instead
authorTomas V.V.Cox <cox@php.net>
Mon, 17 Jun 2002 13:50:33 +0000 (13:50 +0000)
committerTomas V.V.Cox <cox@php.net>
Mon, 17 Jun 2002 13:50:33 +0000 (13:50 +0000)
of the "hack"

pear/PEAR/Dependency.php

index 4db89d294890732c33ad960ece6744117c3f9f8e..38d2eb762edc5b7b01657b09e3d71fd063f9bd14 100644 (file)
@@ -134,11 +134,8 @@ class PEAR_Dependency
     function checkExtension($name, $req = null, $relation = 'has')
     {
         // XXX (ssb): could we avoid loading the extension here?
-        if (!extension_loaded($name)) {
-            $dlext = OS_WINDOWS ? '.dll' : '.so';
-            if (!@dl($name . $dlext)) {
-                return "'$name' PHP extension is not installed";
-            }
+        if (!PEAR::loadExtension($name)) {
+            return "'$name' PHP extension is not installed";
         }
         if ($relation == 'has') {
             return false;