Quellcode durchsuchen

[Console] fixed status code when it is > 255

Tom Van Looy vor 14 Jahren
Ursprung
Commit
44f54c2578
1 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen
  1. 3 0
      src/Symfony/Component/Console/Application.php

+ 3 - 0
src/Symfony/Component/Console/Application.php

@@ -123,6 +123,9 @@ class Application
         }
         }
 
 
         if ($this->autoExit) {
         if ($this->autoExit) {
+            if ($statusCode > 255) {
+                $statusCode = 255;
+            }
             // @codeCoverageIgnoreStart
             // @codeCoverageIgnoreStart
             exit($statusCode);
             exit($statusCode);
             // @codeCoverageIgnoreEnd
             // @codeCoverageIgnoreEnd