]> granicus.if.org Git - php/commitdiff
Do not create the registry obj at Installer object creation
authorTomas V.V.Cox <cox@php.net>
Mon, 16 Jun 2003 07:44:46 +0000 (07:44 +0000)
committerTomas V.V.Cox <cox@php.net>
Mon, 16 Jun 2003 07:44:46 +0000 (07:44 +0000)
(it's problematic when pear install -R <DIR> is used)

pear/PEAR/Installer.php

index 62238d8aee6aa09ebf56981d6fdf98822a59e3fb..4ac1d33620d3aec771879cba3760c0d4b39816cc 100644 (file)
@@ -117,7 +117,7 @@ class PEAR_Installer extends PEAR_Common
         parent::PEAR_Common();
         $this->setFrontendObject($ui);
         $this->debug = $this->config->get('verbose');
-        $this->registry = &new PEAR_Registry($this->config->get('php_dir'));
+        //$this->registry = &new PEAR_Registry($this->config->get('php_dir'));
     }
 
     // }}}
@@ -801,6 +801,9 @@ class PEAR_Installer extends PEAR_Common
      */
     function checkDeps(&$pkginfo, &$errors)
     {
+        if (empty($this->registry)) {
+            $this->registry = &new PEAR_Registry($this->config->get('php_dir'));
+        }
         $depchecker = &new PEAR_Dependency($this->registry);
         $error = $errors = '';
         $failed_deps = $optional_deps = array();