Open idem84 opened 5 months ago
What is the problem you are seeing? The close in the destructor is in a try-catch block, so I think it should just fail silently and harmlessly in your case; I don't see any error messages or any other problem when I run tests.
Hmm, I think I do see a warning message when I run under Php7.4. That is long out of support, but I'll investigate further.
This is very strange. I can reproduce the problem (for Php7) when running on its own. But I cannot reproduce it when running Phpunit tests with Php7, which is why this code passed all unit tests. I can fix it for Php7, but I can't formally prove that it's been fixed.
Less of a mystery now. Php seems to have changed this from a warning to a fatal error in Php8. So Php8 has no warning message to suppress, and, without an at-sign, Php7 has no reason to suppress a message.
I'm having the same problem with php 7.3 I replaced 【$this->zipClass->close();】with【@$this->zipClass->close();】 Will there be any other side effects?
@ukasinn I think your change will not have side effects. PR #2554 will be a more robust solution when it is merged.
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.
Expected Behavior
I think inside _destruct need to remove close() function
Context
Please fill in your environment information: