]> granicus.if.org Git - php/commitdiff
add checks for extensions that must be loaded
authorGreg Beaver <cellog@php.net>
Sat, 20 Aug 2005 18:31:29 +0000 (18:31 +0000)
committerGreg Beaver <cellog@php.net>
Sat, 20 Aug 2005 18:31:29 +0000 (18:31 +0000)
pear/install-pear.php

index d2d1b804f9e92e61bc8c9cfa461fabe68d7839d9..68a43cb30ccb1be5906d3c318227d5b6229cfb53 100644 (file)
@@ -9,6 +9,19 @@ include_once 'PEAR/Installer.php';
 include_once 'PEAR/Registry.php';
 include_once 'PEAR/Frontend/CLI.php';
 
+$a = true;
+if (!PEAR::loadExtension('xml')) {
+    $a = false;
+    echo "[PEAR] xml extension is required\n";
+}
+if (!PEAR::loadExtension('pcre')) {
+    $a = false;
+    echo "[PEAR] pcre extension is required\n";
+}
+if (!$a) {
+    return -1;
+}
+
 $force = false;
 $install_files = array();
 array_shift($argv);