summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-05-31 11:37:19 +0200
committerAleksander Machniak <alec@alec.pl>2013-05-31 11:37:19 +0200
commitaf9dbd54b30ce162a401f77f571c65bd9895d0db (patch)
tree5ba4ea68bb7571e39c02f6aa8efa359a92d6f7d0 /program/steps
parent3863a9d2c5515fe4c61c433503450531098358ec (diff)
Fix PHP warning when responding to a message with many Return-Path headers (#1489136)
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/func.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index ab4b41155..1a687f508 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1786,9 +1786,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;
+ }
}
}
}