Merged master into php7 to support 0.13.1

This commit is contained in:
Intyre
2016-01-22 17:36:45 +01:00
117 changed files with 2732 additions and 393 deletions

View File

@ -75,8 +75,8 @@ namespace pocketmine {
const VERSION = "1.6dev";
const API_VERSION = "2.0.0";
const CODENAME = "[REDACTED]";
const MINECRAFT_VERSION = "v0.12.1 alpha";
const MINECRAFT_VERSION_NETWORK = "0.12.1";
const MINECRAFT_VERSION = "v0.13.1 alpha";
const MINECRAFT_VERSION_NETWORK = "0.13.1";
/*
* Startup code. Do not look at it, it may harm you.
@ -170,11 +170,13 @@ namespace pocketmine {
* This is here so that people don't come to us complaining and fill up the issue tracker when they put
* an incorrect timezone abbreviation in php.ini apparently.
*/
$default_timezone = date_default_timezone_get();
if(strpos($default_timezone, "/") === false){
$default_timezone = timezone_name_from_abbr($default_timezone);
$timezone = ini_get("date.timezone");
if(strpos($timezone, "/") === false){
$default_timezone = timezone_name_from_abbr($timezone);
ini_set("date.timezone", $default_timezone);
date_default_timezone_set($default_timezone);
} else {
date_default_timezone_set($timezone);
}
}
@ -394,8 +396,8 @@ namespace pocketmine {
if(substr_count($pthreads_version, ".") < 2){
$pthreads_version = "0.$pthreads_version";
}
if(version_compare($pthreads_version, "3.0.7") < 0){
$logger->critical("pthreads >= 3.0.7 is required, while you have $pthreads_version.");
if(version_compare($pthreads_version, "3.1.5") < 0){
$logger->critical("pthreads >= 3.1.5 is required, while you have $pthreads_version.");
++$errors;
}