Skip to content

Commit

Permalink
Return exit status 1 when PHP is < 7.0
Browse files Browse the repository at this point in the history
Resolves #4153
  • Loading branch information
brandonkelly committed Apr 17, 2019
1 parent 64d4d8a commit 1b923b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
### Fixed
- Fixed an error where re-saving a site would reset its sorting order. ([#4147](https://github.com/craftcms/cms/issues/4147))
- Fixed a SQL error that could occur when updating to Craft 3.1. ([#3663](https://github.com/craftcms/cms/issues/3663))
- Fixed a bug where Craft wasn’t returning a `1` exit code for console requests if the server was running under PHP 7. ([#4153](https://github.com/craftcms/cms/issues/4153))

## 3.1.23 - 2019-04-16

Expand Down
7 changes: 5 additions & 2 deletions bootstrap/console.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
* @license https://craftcms.github.io/license/
*/

use yii\console\ExitCode;

// Make sure they're running PHP 7+
if (PHP_VERSION_ID < 70000) {
exit("Craft requires PHP 7.0 or later.\n");
if (PHP_VERSION_ID < 80000) {
echo "Craft requires PHP 7.0 or later.\n";
exit(ExitCode::UNSPECIFIED_ERROR);
}

mb_detect_order('auto');
Expand Down

0 comments on commit 1b923b5

Please sign in to comment.