-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Milestone
Description
Describe the Bug
Inside file TemplateProcessor.php in functions __destruct() and save() repeat code that close ZipArchive, and becouse of that error appears: ZipArchive::close() Invalid or unitialized Zip object
Steps to Reproduce
Please provide a code sample that reproduces the issue.
function __destruct()
// ZipClass
if ($this->zipClass) {
try {
$this->zipClass->close();
} catch (Throwable $e) {
// Nothing to do here.
}
}
function save()
// Close zip file
if (false === $this->zipClass->close()) {
throw new Exception('Could not close zip file.'); // @codeCoverageIgnore
}
Expected Behavior
I think inside _destruct need to remove close() function
Context
Please fill in your environment information:
- PHP Version: 7.4
- PHPWord Version: Latest