Skip to content

Commit e56c265

Browse files
committed
minor symfony#25453 [Console] Fix console tests by adding the missing condition (Simperfit)
This PR was merged into the 3.3 branch. Discussion ---------- [Console] Fix console tests by adding the missing condition | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | no <!-- don't forget to update UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | none | License | MIT | Doc PR | The old conditions was testing that the exit code is different than 0. I just add this tests back since it is needed. ![resized_20171211_192030_2217](https://user-images.githubusercontent.com/3451634/33872253-5db07958-df16-11e7-85e9-4fc0cb5002ce.jpeg) Commits ------- 57f8129 [Console] Fix console tests by adding the missing condition
2 parents 5b51491 + 57f8129 commit e56c265

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Console/Event/ConsoleErrorEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ public function setExitCode($exitCode)
7878
*/
7979
public function getExitCode()
8080
{
81-
return null !== $this->exitCode ? $this->exitCode : (is_int($this->error->getCode()) ? $this->error->getCode() : 1);
81+
return null !== $this->exitCode ? $this->exitCode : (is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1);
8282
}
8383
}

0 commit comments

Comments
 (0)