[Console] Fix console tests by adding the missing condition

This commit is contained in:
Amrouche Hamza 2017-12-12 08:24:27 +01:00
parent b4e0a45acf
commit 57f8129598
No known key found for this signature in database
GPG Key ID: 6968F2785ED4F012

View File

@ -78,6 +78,6 @@ final class ConsoleErrorEvent extends ConsoleEvent
*/
public function getExitCode()
{
return null !== $this->exitCode ? $this->exitCode : (is_int($this->error->getCode()) ? $this->error->getCode() : 1);
return null !== $this->exitCode ? $this->exitCode : (is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1);
}
}