From: Tomas V.V.Cox Date: Mon, 17 Jun 2002 13:50:33 +0000 (+0000) Subject: Use the new PEAR::loadExtension() in checkExtension() instead X-Git-Tag: php-4.3.0dev_zend2_alpha2~226 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=80361edcb65840d41bc6cb0b09c92cd9d1f37f0c;p=php Use the new PEAR::loadExtension() in checkExtension() instead of the "hack" --- diff --git a/pear/PEAR/Dependency.php b/pear/PEAR/Dependency.php index 4db89d2948..38d2eb762e 100644 --- a/pear/PEAR/Dependency.php +++ b/pear/PEAR/Dependency.php @@ -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;