mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Clear Plugin file error during a crash
This commit is contained in:
parent
f485124190
commit
22cc3d4d83
@ -291,7 +291,7 @@ class PocketMinecraftServer{
|
|||||||
$er = error_get_last();
|
$er = error_get_last();
|
||||||
$dump .= "Error: ".var_export($er, true)."\r\n\r\n";
|
$dump .= "Error: ".var_export($er, true)."\r\n\r\n";
|
||||||
$dump .= "Code: \r\n";
|
$dump .= "Code: \r\n";
|
||||||
$file = file($er["file"], FILE_IGNORE_NEW_LINES);
|
$file = @file($er["file"], FILE_IGNORE_NEW_LINES);
|
||||||
for($l = max(0, $er["line"] - 10); $l < $er["line"] + 10; ++$l){
|
for($l = max(0, $er["line"] - 10); $l < $er["line"] + 10; ++$l){
|
||||||
$dump .= "[".($l + 1)."] ".$file[$l]."\r\n";
|
$dump .= "[".($l + 1)."] ".$file[$l]."\r\n";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user