[PR #7] [CLOSED] status codes #7595

Closed
opened 2026-01-22 15:55:57 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/7
Author: @tvlooy
Created: 10/12/2010
Status: Closed

Base: masterHead: master


📝 Commits (1)

📊 Changes

1 file changed (+3 additions, -0 deletions)

View changed files

📝 lib/vendor/Symfony/Component/Console/Application.php (+3 -0)

📄 Description

if you return a status code bigger than 255, bash will see it as status code 0. Proof:
php -r "exit(255);" ; echo? 255
php -r "exit(256);" ; echo? 0

This is also in the bash manpage in the section "EXIT STATUS". This fix makes sure an error code stays an error code (round it to 255, which means "error code out of range" by the way), so we can check for it. I noticed this because Doctrine 2.0 migrations threw a PDO exception and tried to exit with code 23000. This became an exit(0) and our buildsystem did a thumbs up. Obviously not ok :-)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/7 **Author:** [@tvlooy](https://github.com/tvlooy) **Created:** 10/12/2010 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`b43b108`](https://github.com/doctrine/orm/commit/b43b108df51585aae7a619b1663778cbdc65665c) status codes fix ### 📊 Changes **1 file changed** (+3 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `lib/vendor/Symfony/Component/Console/Application.php` (+3 -0) </details> ### 📄 Description if you return a status code bigger than 255, bash will see it as status code 0. Proof: $ php -r "exit(255);" ; echo $? 255 $ php -r "exit(256);" ; echo $? 0 This is also in the bash manpage in the section "EXIT STATUS". This fix makes sure an error code stays an error code (round it to 255, which means "error code out of range" by the way), so we can check for it. I noticed this because Doctrine 2.0 migrations threw a PDO exception and tried to exit with code 23000. This became an exit(0) and our buildsystem did a thumbs up. Obviously not ok :-) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 15:55:57 +01:00
admin closed this issue 2026-01-22 15:55:57 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#7595