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    
Subscription  


 [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

Comments

 [2010-09-02 17:07 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!