Permalink
Browse files

Fixed Bug #18982: Non-static method Mail_mimePart::encodeHeader() sho…

…uld not be called statically
  • Loading branch information...
1 parent 7f5612e commit a6f4c7f5182cdeccdd1df9c6cef3e00b52022ccb @alecpl alecpl committed Mar 12, 2012
Showing with 11 additions and 534 deletions.
  1. +6 −4 Mail/Mime2.php
  2. +2 −2 Mail/MimePart2.php
  3. +3 −528 package.xml
View
@@ -1286,15 +1286,17 @@ private function _encodeHeaders($input, $params = array())
foreach ($input as $hdr_name => $hdr_value) {
if (is_array($hdr_value)) {
foreach ($hdr_value as $idx => $value) {
- $input[$hdr_name][$idx] = $this->encodeHeader(
+ $input[$hdr_name][$idx] = Mail_MimePart2::encodeHeader(
$hdr_name, $value,
- $build_params['head_charset'], $build_params['head_encoding']
+ $build_params['head_charset'], $build_params['head_encoding'],
+ $this->_build_params['eol']
);
}
} else {
- $input[$hdr_name] = $this->encodeHeader(
+ $input[$hdr_name] = Mail_MimePart2::encodeHeader(
$hdr_name, $hdr_value,
- $build_params['head_charset'], $build_params['head_encoding']
+ $build_params['head_charset'], $build_params['head_encoding'],
+ $this->_build_params['eol']
);
}
}
View
@@ -237,7 +237,7 @@ public function __construct($body = '', $params = array())
}
if (!empty($params['description'])) {
- $headers['Content-Description'] = $this->encodeHeader(
+ $headers['Content-Description'] = self::encodeHeader(
'Content-Description', $params['description'],
!empty($params['headers_charset']) ? $params['headers_charset'] : 'US-ASCII',
!empty($params['name_encoding']) ? $params['name_encoding'] : 'quoted-printable',
@@ -775,7 +775,7 @@ private function _buildRFC2047Param($name, $value, $charset,
* @access public
* @since 1.6.1
*/
- public function encodeHeader($name, $value, $charset='ISO-8859-1',
+ public static function encodeHeader($name, $value, $charset='ISO-8859-1',
$encoding='quoted-printable', $eol="\r\n"
) {
// Structured headers
Oops, something went wrong.

0 comments on commit a6f4c7f

Please sign in to comment.