Skip to content

Commit 9db3eda

Browse files
committed
Fix #73226: --r[fcez] always return zero exit code
This makes the behavior consistent with `--ri`, and is likely useful for scripting. Closes phpGH-7221.
1 parent a6b4308 commit 9db3eda

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ PHP NEWS
1313
(cmb)
1414
. Fixed bug #80173 (Using return value of zend_assign_to_variable() is not
1515
safe). (Nikita)
16+
. Fixed bug #73226 (--r[fcez] always return zero exit code). (cmb)
1617

1718
- Intl:
1819
. Fixed bug #72809 (Locale::lookup() wrong result with canonicalize option).

sapi/cli/php_cli.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
10861086
zend_printf("Exception: %s\n", Z_STRVAL_P(msg));
10871087
zval_ptr_dtor(&tmp);
10881088
EG(exception) = NULL;
1089+
exit_status = 1;
10891090
} else {
10901091
zend_print_zval(&ref, 0);
10911092
zend_write("\n", 1);

0 commit comments

Comments
 (0)