summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-08-06 08:03:15 +0200
committerAleksander Machniak <alec@alec.pl>2014-08-06 08:03:15 +0200
commit642522f38656410589fd5693f9baea0f54530e89 (patch)
tree5777376edfadc3193cf3243120aabe189feca328
parente32da281bb796431d700e39e4ab10b94e3038ee7 (diff)
parent539fe0b84ddfd13a6c7d7d86567d05b774980d1b (diff)
Merge pull request #209 from bbraybrook/header_array_fix
Fix stringify problem when multiple headers values exist to be returned
-rw-r--r--program/lib/Roundcube/rcube_message_header.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/program/lib/Roundcube/rcube_message_header.php b/program/lib/Roundcube/rcube_message_header.php
index 2bda930eb..b4d20e09a 100644
--- a/program/lib/Roundcube/rcube_message_header.php
+++ b/program/lib/Roundcube/rcube_message_header.php
@@ -225,8 +225,15 @@ class rcube_message_header
}
if ($decode) {
- $value = rcube_mime::decode_header($value, $this->charset);
- $value = rcube_charset::clean($value);
+ if (is_array($value)) {
+ foreach ($value as $key=>$val) {
+ $value[$key] = rcube_mime::decode_header($val, $this->charset);
+ $value[$key] = rcube_charset::clean($val);
+ }
+ } else {
+ $value = rcube_mime::decode_header($value, $this->charset);
+ $value = rcube_charset::clean($value);
+ }
}
return $value;