|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78323 Code 0 is returned on invalid options
Submitted: 2019-07-23 00:56 UTC Modified: -
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: grzegorz129 at gmail dot com Assigned:
Status: Closed Package: CGI/CLI related
PHP Version: 7.3.7 OS: Linux
Private report: No CVE-ID: None
 [2019-07-23 00:56 UTC] grzegorz129 at gmail dot com
When running php with invalid option, e.g. "php --memory-limit=1G" instead "php -dmemory-limit=1G" the PHP help is displayed and code 0 is returned.

Expected result:
Code different than 0 should be returned to avoid treating an obvious error as success.

Actual result:
Code of success is returned.


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-07-23 14:12 UTC] pierre at pcservice dot co dot za
The following pull request has been associated:

Patch Name: Set CLI exit code to 1 when invalid parameters are passed
On GitHub:
 [2020-01-27 12:32 UTC]
Automatic comment on behalf of
Log: Fix bug #78323: Code 0 is returned on invalid options
 [2020-01-27 12:32 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 15 07:01:29 2024 UTC