Browse Source

Fixed bug #62725 (Calling exit() in a shutdown function does not return the exit value)

The fix is make 5.4 behavior consistent with 5.3
pull/148/head
Xinchen Hui 14 years ago
parent
commit
d1f0662e4d
  1. 4
      NEWS
  2. 6
      sapi/cli/php_cli.c

4
NEWS

@ -2,6 +2,10 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2012, PHP 5.4.7
- Core:
. Fixed bug #62725 (Calling exit() in a shutdown function does not return
the exit value). (Laruence)
- PDO:
. Fixed bug #62685 (Wrong return datatype in PDO::inTransaction()). (Laruence)

6
sapi/cli/php_cli.c

@ -1167,15 +1167,15 @@ static int do_cli(int argc, char **argv TSRMLS_DC) /* {{{ */
} zend_end_try();
out:
if (exit_status == 0) {
exit_status = EG(exit_status);
}
if (request_started) {
php_request_shutdown((void *) 0);
}
if (translated_path) {
free(translated_path);
}
if (exit_status == 0) {
exit_status = EG(exit_status);
}
return exit_status;
err:
sapi_deactivate(TSRMLS_C);

Loading…
Cancel
Save