mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
MFH: Fixed bug #60978 (exit code incorrect)
This commit is contained in:
parent
2e5e82a8ca
commit
5f99d789b5
1
NEWS
1
NEWS
@ -11,6 +11,7 @@ PHP NEWS
|
||||
accessing a static property). (Laruence)
|
||||
. Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical
|
||||
vars). (Laruence)
|
||||
. Fixed bug #60978 (exit code incorrect). (Laruence)
|
||||
|
||||
- Standard:
|
||||
. Fixed memory leak in substr_replace. (Pierrick)
|
||||
|
10
Zend/tests/bug60978.phpt
Executable file
10
Zend/tests/bug60978.phpt
Executable file
@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
Bug #60978 (exit code incorrect)
|
||||
--FILE--
|
||||
<?php
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
exec($php . ' -n -r "exit(2);"', $output, $exit_code);
|
||||
echo $exit_code;
|
||||
?>
|
||||
--EXPECT--
|
||||
2
|
@ -1195,7 +1195,13 @@ ZEND_API int zend_eval_stringl(char *str, int str_len, zval *retval_ptr, char *s
|
||||
}
|
||||
CG(interactive) = 0;
|
||||
|
||||
zend_execute(new_op_array TSRMLS_CC);
|
||||
zend_try {
|
||||
zend_execute(new_op_array TSRMLS_CC);
|
||||
} zend_catch {
|
||||
destroy_op_array(new_op_array TSRMLS_CC);
|
||||
efree(new_op_array);
|
||||
zend_bailout();
|
||||
} zend_end_try();
|
||||
|
||||
CG(interactive) = orig_interactive;
|
||||
if (local_retval_ptr) {
|
||||
|
Loading…
Reference in New Issue
Block a user