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

Bug #7875 Impossible to extende Mail_mimeDecode
Submitted: 2006-06-12 10:21 UTC Modified: 2010-09-02 12:07 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    
Subscription  


 [2006-06-12 10: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

Comments

 [2010-09-02 12: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 pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net 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.