mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Merge branch 'release/3.2' into release/3.3
This commit is contained in:
commit
df6bb2ea0e
@ -212,11 +212,11 @@ class CrashDump{
|
|||||||
$this->addLine("Code:");
|
$this->addLine("Code:");
|
||||||
$this->data["code"] = [];
|
$this->data["code"] = [];
|
||||||
|
|
||||||
if($this->server->getProperty("auto-report.send-code", true) !== false){
|
if($this->server->getProperty("auto-report.send-code", true) !== false and file_exists($error["fullFile"])){
|
||||||
$file = @file($error["fullFile"], FILE_IGNORE_NEW_LINES);
|
$file = @file($error["fullFile"], FILE_IGNORE_NEW_LINES);
|
||||||
for($l = max(0, $error["line"] - 10); $l < $error["line"] + 10; ++$l){
|
for($l = max(0, $error["line"] - 10); $l < $error["line"] + 10 and isset($file[$l]); ++$l){
|
||||||
$this->addLine("[" . ($l + 1) . "] " . @$file[$l]);
|
$this->addLine("[" . ($l + 1) . "] " . $file[$l]);
|
||||||
$this->data["code"][$l + 1] = @$file[$l];
|
$this->data["code"][$l + 1] = $file[$l];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user