Skip to content

Commit

Permalink
Fixed enforced application error codes (BC Break)
Browse files Browse the repository at this point in the history
* Do not return higher error code than 254
* Prevent returning negative error codes
  • Loading branch information
fprochazka committed Apr 7, 2014
1 parent 5e9a073 commit e5dc7e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Kdyby/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function run(InputInterface $input = NULL, OutputInterface $output = NULL
}
}

return min((int)$e->getCode(), 255) ?: 255;
return max(min((int) $e->getCode(), 254), 254);
}
}

Expand Down

0 comments on commit e5dc7e5

Please sign in to comment.