]> granicus.if.org Git - php/commitdiff
Fixed bug #52496 (Zero exit code on option parsing failure).
authorIlia Alshanetsky <iliaa@php.net>
Mon, 30 May 2011 15:57:50 +0000 (15:57 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 30 May 2011 15:57:50 +0000 (15:57 +0000)
NEWS
sapi/cli/php_cli.c

diff --git a/NEWS b/NEWS
index e0c676598b271c6d8258cea41bfe17698fd942df..eca47322e6d2382580ee66fdd40f77bba6b4689d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -54,6 +54,9 @@ PHP                                                                        NEWS
   . Fixed bug #54529 (SAPI crashes on apache_config.c:197).
     (hebergement at riastudio dot fr)
 
+- CLI SAPI:
+  . Fixed bug #52496 (Zero exit code on option parsing failure). (Ilia)
+
 - cURL:
   . Added CURLINFO_REDIRECT_URL support. (Daniel Stenberg, Pierre)
   . Added support for CURLOPT_MAX_RECV_SPEED_LARGE and 
index 1bc0f80d0a27f32919991f23ef1ae2f7cf53f48e..b5b95b48a6989cd6bbbce26c8831558e010f40af 100644 (file)
@@ -799,7 +799,7 @@ int main(int argc, char *argv[])
                                request_started = 1;
                                php_cli_usage(argv[0]);
                                php_end_ob_buffers(1 TSRMLS_CC);
-                               exit_status=0;
+                               exit_status = (c == '?' && argc > 1 && !strchr(argv[1],  c));
                                goto out;
 
                        case 'i': /* php info & quit */