PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » System » System_Command » Bug #4579

Issue with constructor of Command

Details

Submitted2005-06-13 08:15 UTC
Fromdanielr at electroteque dot org
Assignedarnaud
StatusClosed
PackageSystem_Command
PHP Version5.0.3
OSN/A
Roadmaps(Not assigned)

Comments

[2005-06-13 08:15 UTC] danielr at electroteque dot org

Description:
------------
I have experienced a freaky bug in with System_Command
in PHP5. Without even starting the contructor the page
dies with any errors around this part of the
constructor. As you can see I had to comment out the
$this = or else the page stops loading, and I am getting
no debug at all ! What do i do ?

// Find the first available shell
if (empty($this->options['SHELL'])) {

foreach ($this->shells as $shell) {
if ($this->options['SHELL'] = $this-
>which($shell)) {
break;
}
}

// see if we still have no shell
if (empty($this->options['SHELL'])) {
//$this = PEAR::raiseError(null,
SYSTEM_COMMAND_NO_SHELL, null, E_USER_WARNING, null,
'System_Command_Error', true);
return;
}

}

// Caputre a temporary directory for capturing
stderr from commands
$this->tmpdir = System::tmpdir();
if (!System::mkDir("-p {$this->tmpdir}")) {
//$this = PEAR::raiseError(null,
SYSTEM_COMMAND_TMPDIR_ERROR, null, E_USER_WARNING, null,
'System_Command_Error', true);
return;
}