summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--sapi/cli/php_cli.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index e0c676598b..eca47322e6 100644
--- 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
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 1bc0f80d0a..b5b95b48a6 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -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 */