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

Bug #21001 PEAR_ERROR_DIE exit code is 0
Submitted: 2015-12-16 15:05 UTC
From: danielc Assigned: danielc
Status: Closed Package: PEAR (version 1.10.1)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    

 [2015-12-16 15:05 UTC] danielc (Daniel Convissor)
Description: ------------ When using PEAR_ERROR_DIE, the code at PEAR.php line 917 calls die(<msg>). That means the script exists with the message displayed, but the script's result code is 0. Thus another shell script calling the given PEAR based script can not tell the difference between the script succeeding or failing. Change line 917 to print the error message then on the next line exit($code).


 [2015-12-16 15:05 UTC] danielc (Daniel Convissor)
-Status: Open +Status: Assigned -Assigned To: +Assigned To: danielc
 [2015-12-16 16:06 UTC] danielc (Daniel Convissor)
-Status: Assigned +Status: Closed
Fixed in commit 15625a7.