mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Removed the last backtrace funcion due to an infinite loop
This commit is contained in:
parent
a3e141672a
commit
8c32b3d896
@ -474,8 +474,6 @@ class PocketMinecraftServer{
|
|||||||
global $arguments;
|
global $arguments;
|
||||||
$dump .= "Parameters: ".var_export($arguments, true)."\r\n\r\n\r\n";
|
$dump .= "Parameters: ".var_export($arguments, true)."\r\n\r\n\r\n";
|
||||||
$dump .= "server.properties: ".var_export($this->api->getProperties(), true)."\r\n\r\n\r\n";
|
$dump .= "server.properties: ".var_export($this->api->getProperties(), true)."\r\n\r\n\r\n";
|
||||||
global $lasttrace;
|
|
||||||
$dump .= "Last Backtrace: ".$lasttrace."\r\n\r\n\r\n";
|
|
||||||
if($this->api->plugin instanceof PluginAPI){
|
if($this->api->plugin instanceof PluginAPI){
|
||||||
$dump .= "Loaded plugins: ".var_export($this->api->plugin->getList(), true)."\r\n\r\n\r\n";
|
$dump .= "Loaded plugins: ".var_export($this->api->plugin->getList(), true)."\r\n\r\n\r\n";
|
||||||
}
|
}
|
||||||
|
@ -52,47 +52,45 @@ if(version_compare(CURRENT_PHP_VERSION, PHP_VERSION) > 0){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(php_sapi_name() !== "cli"){
|
if(php_sapi_name() !== "cli"){
|
||||||
console("[ERROR] Use PHP-CLI to execute the server or create your own", true, true, 0);
|
console("[ERROR] You must run PocketMine-MP using the CLI.", true, true, 0);
|
||||||
++$errors;
|
++$errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!extension_loaded("sockets") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "sockets." . PHP_SHLIB_SUFFIX) === false){
|
if(!extension_loaded("sockets") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "sockets." . PHP_SHLIB_SUFFIX) === false){
|
||||||
console("[ERROR] Unable to find Socket extension", true, true, 0);
|
console("[ERROR] Unable to find the Socket extension.", true, true, 0);
|
||||||
++$errors;
|
++$errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!extension_loaded("pthreads") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "pthreads." . PHP_SHLIB_SUFFIX) === false){
|
if(!extension_loaded("pthreads") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "pthreads." . PHP_SHLIB_SUFFIX) === false){
|
||||||
console("[ERROR] Unable to find pthreads extension. Use the Installer available in the Homepage", true, true, 0);
|
console("[ERROR] Unable to find the pthreads extension.", true, true, 0);
|
||||||
++$errors;
|
++$errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!extension_loaded("curl") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "curl." . PHP_SHLIB_SUFFIX) === false){
|
if(!extension_loaded("curl") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "curl." . PHP_SHLIB_SUFFIX) === false){
|
||||||
console("[ERROR] Unable to find cURL extension", true, true, 0);
|
console("[ERROR] Unable to find the cURL extension.", true, true, 0);
|
||||||
++$errors;
|
++$errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!extension_loaded("sqlite3") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "sqlite3." . PHP_SHLIB_SUFFIX) === false){
|
if(!extension_loaded("sqlite3") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "sqlite3." . PHP_SHLIB_SUFFIX) === false){
|
||||||
console("[ERROR] Unable to find SQLite3 extension", true, true, 0);
|
console("[ERROR] Unable to find the SQLite3 extension.", true, true, 0);
|
||||||
++$errors;
|
++$errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!extension_loaded("zlib") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "zlib." . PHP_SHLIB_SUFFIX) === false){
|
if(!extension_loaded("zlib") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "zlib." . PHP_SHLIB_SUFFIX) === false){
|
||||||
console("[ERROR] Unable to find Zlib extension", true, true, 0);
|
console("[ERROR] Unable to find the Zlib extension.", true, true, 0);
|
||||||
++$errors;
|
++$errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!extension_loaded("gmp") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "gmp." . PHP_SHLIB_SUFFIX) === false){
|
if(!extension_loaded("gmp") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "gmp." . PHP_SHLIB_SUFFIX) === false){
|
||||||
console("[ERROR] Unable to find GMP extension", true, true, 0);
|
console("[ERROR] Unable to find the GMP extension.", true, true, 0);
|
||||||
++$errors;
|
++$errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($errors > 0){
|
if($errors > 0){
|
||||||
|
console("[ERROR] Please use the installer provided on the homepage.", true, true, 0);
|
||||||
exit(1); //Exit with error
|
exit(1); //Exit with error
|
||||||
}
|
}
|
||||||
|
|
||||||
/***REM_START***/
|
/***REM_START***/
|
||||||
require_all(FILE_PATH . "src/");
|
require_all(FILE_PATH . "src/");
|
||||||
/***REM_END***/
|
/***REM_END***/
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
@ -209,11 +209,6 @@ function console($message, $EOL = true, $log = true, $level = 1){
|
|||||||
function fatal_handler($errno, $errstr, $errfile, $errline){
|
function fatal_handler($errno, $errstr, $errfile, $errline){
|
||||||
global $lasttrace;
|
global $lasttrace;
|
||||||
console("[ERROR] A level ".$errno." error happened: \"$errstr\" in \"$errfile\" at line $errline", true, true, 0);
|
console("[ERROR] A level ".$errno." error happened: \"$errstr\" in \"$errfile\" at line $errline", true, true, 0);
|
||||||
ob_start();
|
|
||||||
debug_print_backtrace();
|
|
||||||
$lasttrace = ob_get_contents();
|
|
||||||
ob_end_clean();
|
|
||||||
console("[ERROR] [Backtrace] $lasttrace", true, true, 0);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user