Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.6

Bug #7875 Impossible to extende Mail_mimeDecode
Submitted: 2006-06-12 15:21 UTC
From: pavel dot hlousek at gmail dot com Assigned: alan_k
Status: Closed Package: Mail_mimeDecode (version CVS)
PHP Version: 4.4.1 OS:
Roadmaps: 1.6.0    
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
2010-09-02 17:07 UTC
Bug Type:
From: pavel dot hlousek at gmail dot com
New email:
PHP Version: Package Version: OS:


 [2006-06-12 15:21 UTC] pavel dot hlousek at gmail dot com (Pavel)
Description: ------------ The line (178) in function decode(): $isStatic = !(isset($this) && get_class($this) == __CLASS__); disables extending the Mail_mimeDecode class. I suggest to replace it with more general: $isStatic = !(isset($this) && is_a($this, __CLASS__)); that works perfectly. Test script: --------------- class My_mimeDecode extends Mail_mimeDecode { var $_output_encoding_headers = false; function My_mimeDecode($input) { parent::Mail_mimeDecode($input); } function decode($params = null) { $this->_output_encoding_headers = isset($params['output_encoding_headers']) ? $params['output_encoding_headers'] : false; return parent::decode($params); } } $decoder =& new My_mimeDecode($my_email_message); $email = $decoder->decode(); Expected result: ---------------- A decoded email message in $email. Actual result: -------------- Raises error (line 189): Called statically and no input given


 [2010-09-02 17:07 UTC] alan_k (Alan Knowles)
-Status: Analyzed +Status: Closed -Assigned To: +Assigned To: alan_k
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.