Added PHP version check

This commit is contained in:
Shoghi Cervantes Pueyo 2013-02-02 20:27:07 +01:00
parent 8513a34358
commit bb68f8f305
2 changed files with 6 additions and 3 deletions

View File

@ -41,4 +41,5 @@ define("TEST_MD5", "d0ca3786e53b615bb4fb9f5094d5c9a7");
define("MAJOR_VERSION", "Alpha_1.2dev");
define("CURRENT_STRUCTURE", 5);
define("CURRENT_PROTOCOL", 9);
define("CURRENT_MINECRAFT_VERSION", "v0.6.1 alpha");
define("CURRENT_MINECRAFT_VERSION", "v0.6.1 alpha");
define("CURRENT_PHP_VERSION", "5.4.11");

View File

@ -41,8 +41,10 @@ if(version_compare("5.4.0", PHP_VERSION) > 0){
++$errors;
}
if(version_compare("5.5.0", PHP_VERSION) <= 0){
console("[NOTICE] PocketMine-MP hasn't been tested with PHP >= 5.5", true, true, 0);
if(version_compare(CURRENT_PHP_VERSION, PHP_VERSION) > 0){
console("[NOTICE] PocketMine-MP hasn't been tested with PHP < ".CURRENT_PHP_VERSION, true, true, 0);
}elseif(version_compare(CURRENT_PHP_VERSION, PHP_VERSION) < 0){
console("[NOTICE] PocketMine-MP hasn't been tested with PHP > ".CURRENT_PHP_VERSION, true, true, 0);
}
if(php_sapi_name() !== "cli"){