Fixed some crashes related to crashing

This commit is contained in:
Shoghi Cervantes
2015-01-02 19:19:34 +01:00
parent 04bdb13103
commit 0da628deca
3 changed files with 11 additions and 3 deletions

View File

@ -42,7 +42,10 @@ class CrashDump{
$this->time = time();
$this->server = $server;
$this->path = $this->server->getDataPath() . "CrashDump_" . date("D_M_j-H.i.s-T_Y", $this->time) . ".log";
$this->fp = fopen($this->path, "wb");
$this->fp = @fopen($this->path, "wb");
if(!is_resource($this->fp)){
throw new \RuntimeException("Could not create Crash Dump");
}
$this->data["time"] = $this->time;
$this->addLine($this->server->getName() . " Crash Dump " . date("D M j H:i:s T Y", $this->time));
$this->addLine();