Skip to content
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

fix TypeError: fclose(): supplied resource is not a valid stream reso… #134

Merged
merged 2 commits into from
Feb 12, 2021

Conversation

remicollet
Copy link
Contributor

No description provided.

@glensc
Copy link
Contributor

glensc commented Jan 26, 2021

FYI, in zf1s zf1s/zf1#32 handled as

diff --git a/packages/zend-mail/library/Zend/Mail/Storage/Mbox.php b/packages/zend-mail/library/Zend/Mail/Storage/Mbox.php
index 90e3791c..de963804 100644
--- a/packages/zend-mail/library/Zend/Mail/Storage/Mbox.php
+++ b/packages/zend-mail/library/Zend/Mail/Storage/Mbox.php
@@ -335,7 +335,9 @@ class Zend_Mail_Storage_Mbox extends Zend_Mail_Storage_Abstract
      */
     public function close()
     {
-        @fclose($this->_fh);
+        if ($this->_fh && 'Unknown' !== get_resource_type($this->_fh)) {
+            @fclose($this->_fh);
+        }
         $this->_positions = array();
     }

@remicollet
Copy link
Contributor Author

@glensc sorry, don't understand your comment

@remicollet
Copy link
Contributor Author

Notice there is also tons of Warning: Undefined array key 1 ... related to bad explode usage in various place

@remicollet
Copy link
Contributor Author

I really think this component is NOT yet compatible with PHP 8

@glensc
Copy link
Contributor

glensc commented Jan 26, 2021

@glensc sorry, don't understand your comment

my comment is informative, take or leave it. FYI stands for For Your Information.

@glensc
Copy link
Contributor

glensc commented Jan 26, 2021

I really think this component is NOT yet compatible with PHP 8

You should set your PR status to Draft while it's not ready for merge.

@remicollet
Copy link
Contributor Author

It is ready to merge as it fixes the test suite.

Remaining warnings have to be fixed, but out of the scope of this issue

@Ocramius
Copy link
Member

I really think this component is NOT yet compatible with PHP 8

Can't do much about that besides pursuing further issues, like #113 :-\

I see that travis-ci completely abandoned us today :-(

@glensc
Copy link
Contributor

glensc commented Jan 27, 2021

yes, travis gone already yesterday:

@weierophinney weierophinney added this to the 2.13.1 milestone Feb 12, 2021
@weierophinney weierophinney added the Bug Something isn't working label Feb 12, 2021
@weierophinney weierophinney merged commit 2cd4c5a into laminas:2.13.x Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants