diff options
author | Pierre Joye <pajoye@php.net> | 2002-08-25 18:11:24 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2002-08-25 18:11:24 +0000 |
commit | 9870f455ffebb25a7245a36351cebff9e1b325c0 (patch) | |
tree | 1a6799ae3bacf26654cb7a4b9a141ac70e0d9dea | |
parent | 8638bb882f71111a46f391b074a91e5905521dc7 (diff) | |
download | php-git-9870f455ffebb25a7245a36351cebff9e1b325c0.tar.gz |
Remove $_ENV usages, this causes problems with recommanded php.ini files
Replace by getenv()
-rw-r--r-- | pear/System.php | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/pear/System.php b/pear/System.php index 20196c08f2..c3d068b9d6 100644 --- a/pear/System.php +++ b/pear/System.php @@ -391,27 +391,29 @@ class System function tmpdir() { if (OS_WINDOWS) { - if (System::_myenv('TEMP')) { - return System::_myenv('TEMP'); + if (getenv('TEMP')) { + return getenv('TEMP'); } - if (System::_myenv('TMP')) { - return System::_myenv('TMP'); + if (getenv('TMP')) { + return getenv('TMP'); } - if (System::_myenv('windir')) { - return System::_myenv('windir') . '\temp'; + if (getenv('windir')) { + return getenv('windir') . '\temp'; } - return System::_myenv('SystemRoot') . '\temp'; + return getenv('SystemRoot') . '\temp'; } - if (System::_myenv('TMPDIR')) { - return System::_myenv('TMPDIR'); + if (getenv('TMPDIR')) { + return getenv('TMPDIR'); } return '/tmp'; } /** + * (pajoye) Removed, problem with php.ini-recommanded, E removed + * * (cox) I always get $_ENV empty in both Windows and Linux * with all PHP version <= 4.2.1 - */ + function _myenv($var) { if (!empty($_ENV)) { @@ -419,6 +421,7 @@ class System } return getenv($var); } + */ /** * The "type" command (show the full path of a command) |