mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +00:00
CrashDump: do not assume that error_get_last() always returns array
this returns NULL if there was no error before the shutdown handler was triggered (usually caused by a plugin calling exit() prematurely).
This commit is contained in:
parent
35490ca41c
commit
9c86763322
@ -228,7 +228,10 @@ class CrashDump{
|
||||
if(isset($lastExceptionError)){
|
||||
$error = $lastExceptionError;
|
||||
}else{
|
||||
$error = (array) error_get_last();
|
||||
$error = error_get_last();
|
||||
if($error === null){
|
||||
throw new \RuntimeException("Crash error information missing - did something use exit()?");
|
||||
}
|
||||
$error["trace"] = Utils::currentTrace(3); //Skipping CrashDump->baseCrash, CrashDump->construct, Server->crashDump
|
||||
$errorConversion = [
|
||||
E_ERROR => "E_ERROR",
|
||||
|
Loading…
x
Reference in New Issue
Block a user