diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-05-31 11:37:19 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-05-31 11:38:24 +0200 |
commit | f5fac810dd2b9276994585789cc68f71c4cd4cd3 (patch) | |
tree | c2171e27ef8d19a5b146cc16f7e2324ff4ae698a /program/steps/mail | |
parent | e12ac4e9b55ea44d0fb6e165f473a41083151d43 (diff) |
Fix PHP warning when responding to a message with many Return-Path headers (#1489136)
Conflicts:
CHANGELOG
Diffstat (limited to 'program/steps/mail')
-rw-r--r-- | program/steps/mail/func.inc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 0845bf738..47800564c 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1803,9 +1803,12 @@ function rcmail_identity_select($MESSAGE, $identities = null, $compose_mode = 'r // Try Return-Path if ($from_idx === null && ($return_path = $MESSAGE->headers->others['return-path'])) { foreach ($identities as $idx => $ident) { - if (strpos($return_path, str_replace('@', '=', $ident['email_ascii']).'@') !== false) { - $from_idx = $idx; - break; + $ident = str_replace('@', '=', $ident['email_ascii']) . '@'; + foreach ((array)$return_path as $path) { + if (strpos($path, $ident) !== false) { + $from_idx = $idx; + break 2; + } } } } |