From a3c5670ac8e87f9b88bc4fdcc6bdae96a57138e1 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 7 Jul 2021 16:18:21 +0200 Subject: [PATCH] Fix #73226: --r[fcez] always return zero exit code This makes the behavior consistent with `--ri`, and is likely useful for scripting. --- sapi/cli/php_cli.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 0fd167de63d5a..3dae55014f994 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -1086,6 +1086,7 @@ static int do_cli(int argc, char **argv) /* {{{ */ zend_printf("Exception: %s\n", Z_STRVAL_P(msg)); zval_ptr_dtor(&tmp); EG(exception) = NULL; + exit_status = 1; } else { zend_print_zval(&ref, 0); zend_write("\n", 1);