From 7f1da038bf6c6444f94071020100def148cc5646 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 27 Feb 2023 22:06:11 +0100 Subject: [PATCH] Remove always-false check in CLI This is the case c == 'i', so c == '?' is always false, hence the result is always 0. --- sapi/cli/php_cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index cc9a26c41389d..4766fac2537cd 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -632,7 +632,7 @@ static int do_cli(int argc, char **argv) /* {{{ */ request_started = 1; php_print_info(PHP_INFO_ALL & ~PHP_INFO_CREDITS); php_output_end_all(); - EG(exit_status) = (c == '?' && argc > 1 && !strchr(argv[1], c)); + EG(exit_status) = 0; goto out; case 'v': /* show php version & quit */