Merge pull request #2176 from maartendekeizer/cleanuptempfile
[TemplateProcessor] Clean up temp files
This commit is contained in:
commit
62444d2161
|
|
@ -131,6 +131,14 @@ class TemplateProcessor
|
||||||
$this->tempDocumentContentTypes = $this->zipClass->getFromName($this->getDocumentContentTypesName());
|
$this->tempDocumentContentTypes = $this->zipClass->getFromName($this->getDocumentContentTypesName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function __destruct()
|
||||||
|
{
|
||||||
|
// if the temp file still exists, remove it when running destruct
|
||||||
|
if ($this->tempDocumentFilename && file_exists($this->tempDocumentFilename) && is_writable($this->tempDocumentFilename)) {
|
||||||
|
@unlink($this->tempDocumentFilename);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expose zip class.
|
* Expose zip class.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue