Skip to content

Commit a65eba0

Browse files
committed
Fixed bug #52496 (Zero exit code on option parsing failure).
1 parent 3b030ec commit a65eba0

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ PHP NEWS
5454
. Fixed bug #54529 (SAPI crashes on apache_config.c:197).
5555
(hebergement at riastudio dot fr)
5656

57+
- CLI SAPI:
58+
. Fixed bug #52496 (Zero exit code on option parsing failure). (Ilia)
59+
5760
- cURL:
5861
. Added CURLINFO_REDIRECT_URL support. (Daniel Stenberg, Pierre)
5962
. Added support for CURLOPT_MAX_RECV_SPEED_LARGE and

sapi/cli/php_cli.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ int main(int argc, char *argv[])
799799
request_started = 1;
800800
php_cli_usage(argv[0]);
801801
php_end_ob_buffers(1 TSRMLS_CC);
802-
exit_status=0;
802+
exit_status = (c == '?' && argc > 1 && !strchr(argv[1], c));
803803
goto out;
804804

805805
case 'i': /* php info & quit */

0 commit comments

Comments
 (0)