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

Bug #7875 Impossible to extende Mail_mimeDecode
Submitted: 2006-06-12 10:21 UTC Modified: 2007-02-12 16:17 UTC
From: pavel dot hlousek at gmail dot com Assigned:
Status: Analyzed Package: Mail_mimeDecode (version CVS)
PHP Version: 4.4.1 OS:
Roadmaps: 1.6.0    
Subscription  
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.
Password:
Status:
Package:
Bug Type:
Summary:
From: pavel dot hlousek at gmail dot com
New email:
PHP Version: Package Version: OS:

 

 [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