-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
close() function in destructor of Madzipper causes 'Invalid or uninitialized Zip object' with PHP 8 #21
Comments
Thank you for posting this workaround! |
|
I migrate application from php7.2 to php8 and get this problem.
How do you think it correctly checking? |
Should be fixed in |
Its not fixed at all |
@melikadze can you open a PR with a proposed fix? I do not have time to look into that atm. |
Just to confirm; unfortunately I also am running into the same error |
Apparently, there are ways to close the Zip object when it's not expected to be closed. This would address madnest#21 and madnest#29
@theimerj I created a PR to address this by catching the error |
Sample code to reproduce:
ZipRepository.php
In PHP 8.0, the @ operator does not suppress certain types of errors that were silenced prior to PHP 8.0.
Until this is fixed, I don't call close() after adding the string but let de destructor close it.
The text was updated successfully, but these errors were encountered: