php.net |  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: -
Votes:1
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: grzegorz129 at gmail dot com
New email:
PHP Version: OS:

 

 [2019-07-23 00:56 UTC] grzegorz129 at gmail dot com
Description:
------------
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.

Patches

Pull Requests

Pull requests:

History

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:  https://github.com/php/php-src/pull/4466
Patch:      https://github.com/php/php-src/pull/4466.patch
 [2020-01-27 12:32 UTC] nikic@php.net
Automatic comment on behalf of ivan.mikheykin@flant.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=fd08f062ae5a3c92bfc0345da7e83ab320046864
Log: Fix bug #78323: Code 0 is returned on invalid options
 [2020-01-27 12:32 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC