PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

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;
}