Skip to content

Commit 2b7b4dd

Browse files
committed
Revert "Add destructor wich will try to clean up temp file of the template"
This reverts commit e9cd17d. 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.
1 parent 99d4b29 commit 2b7b4dd

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/PhpWord/TemplateProcessor.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,6 @@ public function __construct($documentTemplate)
131131
$this->tempDocumentContentTypes = $this->zipClass->getFromName($this->getDocumentContentTypesName());
132132
}
133133

134-
public function __destruct()
135-
{
136-
// if the temp file still exists, remove it when running destruct
137-
if ($this->tempDocumentFilename && file_exists($this->tempDocumentFilename) && is_writable($this->tempDocumentFilename)) {
138-
@unlink($this->tempDocumentFilename);
139-
}
140-
}
141-
142134
/**
143135
* Expose zip class.
144136
*

0 commit comments

Comments
 (0)