From f4eb5095a622097b61a626ce290154af82baea9f Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Sat, 20 Aug 2005 18:31:29 +0000 Subject: add checks for extensions that must be loaded --- pear/install-pear.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'pear') diff --git a/pear/install-pear.php b/pear/install-pear.php index d2d1b804f9..68a43cb30c 100644 --- a/pear/install-pear.php +++ b/pear/install-pear.php @@ -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); -- cgit v1.2.1