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 #7121

Error produces by a command is not available if sent to the stderr tmpFile

Details

Submitted2006-03-14 20:09 UTC
Fromrobmadole at gmail dot com
Assignedcconstantine
StatusClosed
PackageSystem_Command
PHP Version5.1.2
OSFreeBSD 6.0
Roadmaps(Not assigned)

Comments

[2006-03-14 20:09 UTC] robmadole at gmail dot com

Description:
------------
If the execute() function on line 406:

$error = implode('', file($tmpFile));
$return = PEAR::raiseError(null, SYSTEM_COMMAND_STDERR, null, E_USER_WARNING, null, 'System_Command_Error', true);

The string $error is not included in the PEAR_Error. Since the temporary file is then shortly deleted, the output from a command that produces an error get's deleted into the ether.

From what I can tell, the $error variable is not used anywhere. I checked the CVS version, same thing with it.

Test script:
---------------
Any command that sends output to stderr

Expected result:
----------------
I would expect the result to be present in the PEAR_Error object (or System_Command_Error object)

[2006-03-14 20:21 UTC] cconstantine at php dot net

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PEAR.

This problem is alredy mentioned in #6268. (The fix for #6268
will fix the problem described here.)

[2006-03-24 16:37 UTC] robmadole at gmail dot com

Fixed.