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

Bug #10676 tmpdir() search variables in wrong order.
Submitted: 2007-04-10 04:19 UTC
From: cwiedmann Assigned: cellog
Status: Closed Package: PEAR (version 1.5.2)
PHP Version: 5.2.1 OS: Windows_NT
Roadmaps: 1.5.3    

Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem : 49 - 15 = ?

 [2007-04-10 04:19 UTC] cwiedmann (Carsten Wiedmann)
Description: ------------ From The function tempdir() in System.php must return first TMP and then TEMP. Test script: --------------- <?php header('Content-Type: text/plain'); require_once 'System.php'; echo "getenv('TMP') : ".getenv('TMP').PHP_EOL; echo "getenv('TEMP') : ".getenv('TEMP').PHP_EOL; echo "System::tmpdir(): ".System::tmpdir(); ?> Expected result: ---------------- getenv('TMP') : C:/Apache2.2/tmp getenv('TEMP') : C:/WINDOWS/temp System::tmpdir(): C:/Apache2.2/tmp Actual result: -------------- getenv('TMP') : C:/Apache2.2/tmp getenv('TEMP') : C:/WINDOWS/temp System::tmpdir(): C:/WINDOWS/temp


 [2007-04-12 02:02 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the 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. the patch breaks BC for unix, and so I removed all changes to unix. Also, I removed all of the unnecessary if/elseif (return concludes the statement, no need to overtax the parser) Also, I do not want tmpdir() to suddenly start returning the cwd(), this is a major BC break. The docs do not expect tmpdir() to work exactly like getTempPath() on Windows 95 - especially in modern windows versions.