Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.16

Bug #13926 install-pear.php does not set cfg_dir if -d option set with no -c option
Submitted: 2008-05-18 08:35 UTC
From: timj Assigned: timj
Status: Closed Package: PEAR (version CVS)
PHP Version: Irrelevant OS:
Roadmaps: 1.8.0alpha1    
Subscription  


 [2008-05-18 08:35 UTC] timj (Tim Jackson)
Description: ------------ The fix to bug #13257 puts a conditional around cfg_dir when using the -w option, which doesn't really make sense. Lines 92-101 say: if (!empty($with_dir)) { $ds = DIRECTORY_SEPARATOR; $config->set('php_dir', $with_dir, 'default'); $config->set('doc_dir', $with_dir . $ds . 'doc', 'default'); $config->set('data_dir', $with_dir . $ds . 'data', 'default'); $config->set('www_dir', $with_dir . $ds . 'htdocs', 'default'); $config->set('test_dir', $with_dir . $ds . 'test', 'default'); if (!empty($cfg_dir)) { $config->set('cfg_dir', $with_dir . $ds . 'cfg', 'default'); } This doesn't make sense because if the user passes -w without -c, cfg_dir will not be set at all. And if they pass it with -c, their preference for cfg_dir gets overridden. The sense of the "if..." should be reversed, so that if cfg_dir has been explicitly set using the -c option, it is NOT overridden here; i.e. "if (empty($cfg_dir)) { ...", otherwise it is set to the default (i.e. $with_dir/cfg)

Comments

 [2008-05-18 08:45 UTC] timj (Tim Jackson)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Fixed in revision 1.33