Skip to content

Commit

Permalink
sanity_check: enforce minimum php version (5.4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Dolgov committed Dec 4, 2015
1 parent b8619f8 commit bfd902b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/sanity_check.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ function initial_sanity_check() {
array_push($errors, "Please don't run this script as root.");
}

if (version_compare(PHP_VERSION, '5.3.0', '<')) {
array_push($errors, "PHP version 5.3.0 or newer required.");
if (version_compare(PHP_VERSION, '5.4.0', '<')) {
array_push($errors, "PHP version 5.4.0 or newer required.");
}

if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) {
Expand Down
4 changes: 2 additions & 2 deletions install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ function make_password($length = 8) {
function sanity_check($db_type) {
$errors = array();

if (version_compare(PHP_VERSION, '5.3.0', '<')) {
array_push($errors, "PHP version 5.3.0 or newer required.");
if (version_compare(PHP_VERSION, '5.4.0', '<')) {
array_push($errors, "PHP version 5.4.0 or newer required.");
}

if (!function_exists("curl_init") && !ini_get("allow_url_fopen")) {
Expand Down

0 comments on commit bfd902b

Please sign in to comment.