From: Ilia Alshanetsky Date: Mon, 30 May 2011 15:57:50 +0000 (+0000) Subject: Fixed bug #52496 (Zero exit code on option parsing failure). X-Git-Tag: php-5.4.0alpha1~119 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5779d5e16d50d679cd9c959293db1bb8b8ae94c;p=php Fixed bug #52496 (Zero exit code on option parsing failure). --- diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 68267c45c5..f90bd061f6 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -813,7 +813,7 @@ int main(int argc, char *argv[]) request_started = 1; php_cli_usage(argv[0]); php_output_end_all(TSRMLS_C); - exit_status=0; + exit_status = (c == '?' && argc > 1 && !strchr(argv[1], c)); goto out; case 'i': /* php info & quit */