Revert "Add destructor wich will try to clean up temp file of the template"

This reverts commit e9cd17d4c7. Because
the temp file is the result of the `save()` method and it's up to the calling
code to handle the result appropriately. Or alternatively use `saveAs()` to
avoid handling it.
This commit is contained in:
Adrien Crivelli 2022-09-20 11:05:16 +02:00
parent 99d4b29471
commit 2b7b4ddc5f
No known key found for this signature in database
GPG Key ID: 16D79B903B4B5874
1 changed files with 0 additions and 8 deletions

View File

@ -131,14 +131,6 @@ 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.
* *