-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] ensure integer exit codes in events #8038
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Tobion
commented
May 14, 2013
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
License | MIT |
@@ -131,7 +131,7 @@ public function run(InputInterface $input = null, OutputInterface $output = null | |||
} | |||
$exitCode = $e->getCode(); | |||
|
|||
$exitCode = is_numeric($exitCode) && $exitCode ? $exitCode : 1; | |||
$exitCode = $exitCode ? (is_numeric($exitCode) ? (int) $exitCode : 1) : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This previously considered null and '' as an error which is not intented.
Seems reasonable to me. |
Looks good to me. We probably need to add tests for the edge cases and I think it should be done on the 2.1 branch instead. |
This PR was merged into the master branch. Discussion ---------- [Console] ensure integer exit codes in events | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT Commits ------- fe1db71 [Console] ensure integer exit codes in events
@fabpot not 2.3? |
sorry, I forgot to switch the target. fixed now. |
@fabpot seems like you didn't merge it in 2.3. It still not there. |