Merge pull request #51 from mitakas/version_check

Compare versions in a more readable way.
This commit is contained in:
Andrew Dolgov 2013-03-15 23:28:52 -07:00
commit a582da6527
2 changed files with 2 additions and 2 deletions

View file

@ -20,7 +20,7 @@
array_push($errors, "Please don't run this script as root.");
}
if (version_compare("5.3.0", phpversion()) == 1) {
if (!(version_compare(PHP_VERSION, '5.3.0', '>='))) {
array_push($errors, "PHP version 5.3.0 or newer required.");
}

View file

@ -7,7 +7,7 @@
// we need a separate check here because functions.php might get parsed
// incorrectly before 5.3 because of :: syntax.
if (version_compare("5.3.0", phpversion()) == 1) {
if (!(version_compare(PHP_VERSION, '5.3.0', '>='))) {
print "<b>Fatal Error</b>: PHP version 5.3.0 or newer required.\n";
exit;
}