diff options
-rw-r--r-- | pear/PEAR/Config.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pear/PEAR/Config.php b/pear/PEAR/Config.php index 0358d7c8a2..82c36fad4a 100644 --- a/pear/PEAR/Config.php +++ b/pear/PEAR/Config.php @@ -73,7 +73,15 @@ if (getenv('PHP_PEAR_INSTALL_DIR')) { if (getenv('PHP_PEAR_EXTENSION_DIR')) { define('PEAR_CONFIG_DEFAULT_EXT_DIR', getenv('PHP_PEAR_EXTENSION_DIR')); } else { - define('PEAR_CONFIG_DEFAULT_EXT_DIR', ini_get('extension_dir')); + if (!ini_get('extension_dir')) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', ini_get('extension_dir')); + } elseif (defined('PEAR_EXTENSION_DIR') && @is_dir(PEAR_EXTENSION_DIR)) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', PEAR_EXTENSION_DIR); + } elseif (defined('PHP_EXTENSION_DIR')) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', PHP_EXTENSION_DIR); + } else { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', '.'); + } } // Default for doc_dir |