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

Bug #10781 tmpDir not being set correctly by construtor
Submitted: 2007-04-19 19:38 UTC
From: joshualross Assigned: cconstantine
Status: Closed Package: System_Command (version 1.0.5)
PHP Version: 5.1.6 OS: Linux
Roadmaps: 1.0.6    
Subscription  
Comments Add Comment Add patch


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:
MUST BE VALID
Solve the problem : 22 - 20 = ?

 
 [2007-04-19 19:38 UTC] joshualross (Joshua Ross)
Description: ------------ The tmpDir property is never correctly set. This is because the property name is tmpDir with an uppercase D but in the constructor the variable tmpdir is set instead. // Caputre a temporary directory for capturing stderr from commands $this->tmpdir = System::tmpdir(); if (!System::mkDir("-p {$this->tmpdir}")) { $this->_initError =& PEAR::raiseError(null, SYSTEM_COMMAND_TMPDIR_ERROR, null, E_USER_WARNING, null, 'System_Command_Error', return; } The fix is change all references to tmpdir to be tmpDir. Test script: --------------- $cmd = new System_Command() if (!empty($cmd->tmpDir)) { echo "tmpDir set to {$cmd->tmpDir}"; } else { echo "tmpDir is empty"; } Expected result: ---------------- tmpDir set to /tmp Actual result: -------------- tmpDir is empty

Comments

 [2007-04-20 13:53 UTC] cconstantine (Craig Constantine)
confirmed. roadmap for v1.0.6
 [2007-04-20 21:29 UTC] cconstantine (Craig Constantine)
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/System_Command