mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 23:29:54 +00:00
Utils: fixed getTrace() including itself in trace when no alt trace is given
it always seemed a little strange that crashdump trace would pop 4 frames when only 3 are written in the comment...
This commit is contained in:
parent
bf8a8b386e
commit
b80868040e
@ -159,7 +159,7 @@ class CrashDump{
|
|||||||
$error = $lastExceptionError;
|
$error = $lastExceptionError;
|
||||||
}else{
|
}else{
|
||||||
$error = (array) error_get_last();
|
$error = (array) error_get_last();
|
||||||
$error["trace"] = Utils::getTrace(4); //Skipping CrashDump->baseCrash, CrashDump->construct, Server->crashDump
|
$error["trace"] = Utils::getTrace(3); //Skipping CrashDump->baseCrash, CrashDump->construct, Server->crashDump
|
||||||
$errorConversion = [
|
$errorConversion = [
|
||||||
E_ERROR => "E_ERROR",
|
E_ERROR => "E_ERROR",
|
||||||
E_WARNING => "E_WARNING",
|
E_WARNING => "E_WARNING",
|
||||||
|
@ -538,6 +538,7 @@ class Utils{
|
|||||||
$e = new \Exception();
|
$e = new \Exception();
|
||||||
$trace = $e->getTrace();
|
$trace = $e->getTrace();
|
||||||
}
|
}
|
||||||
|
++$start; //skip this frame
|
||||||
}
|
}
|
||||||
|
|
||||||
$messages = [];
|
$messages = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user