mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-23 03:44:02 +00:00
Fixed crash reports using invalid lastError data
This commit is contained in:
parent
9124513584
commit
d0936329aa
@ -131,9 +131,7 @@ class CrashDump{
|
||||
|
||||
private function baseCrash(){
|
||||
global $lastError;
|
||||
if(isset($lastError)){
|
||||
$error = $lastError;
|
||||
}else{
|
||||
|
||||
$error = (array) error_get_last();
|
||||
$error["trace"] = getTrace(4);
|
||||
$errorConversion = array(
|
||||
@ -159,6 +157,9 @@ class CrashDump{
|
||||
if(($pos = strpos($error["message"], "\n")) !== false){
|
||||
$error["message"] = substr($error["message"], 0, $pos);
|
||||
}
|
||||
|
||||
if(isset($lastError)){
|
||||
$this->data["lastError"] = $lastError;
|
||||
}
|
||||
|
||||
$this->data["error"] = $error;
|
||||
|
@ -142,13 +142,13 @@ namespace pocketmine {
|
||||
}
|
||||
|
||||
gc_disable();
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
error_reporting(-1);
|
||||
ini_set("allow_url_fopen", 1);
|
||||
ini_set("display_errors", 1);
|
||||
ini_set("display_startup_errors", 1);
|
||||
ini_set("default_charset", "utf-8");
|
||||
|
||||
ini_set("memory_limit", "128M"); //Default
|
||||
ini_set("memory_limit", "256M"); //Default
|
||||
define("pocketmine\\START_TIME", microtime(true));
|
||||
|
||||
$opts = getopt("", array("enable-ansi", "disable-ansi", "data:", "plugins:", "no-wizard"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user