From 9d972dc7c53c1d30e97aae42036a374b9a72c15b Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 28 Sep 2010 07:45:03 +0000 Subject: [PATCH] make sure keywords of parameters/dparameters are stripped of leading and trailing whitespase, as this meets the expectation later on. Otherwise keys in the parameters/dparameters structure may not be found/identified --- egw-pear/Net/IMAP.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/egw-pear/Net/IMAP.php b/egw-pear/Net/IMAP.php index 92efcbe97a..b272e42a53 100644 --- a/egw-pear/Net/IMAP.php +++ b/egw-pear/Net/IMAP.php @@ -734,7 +734,7 @@ class Net_IMAP extends Net_IMAPProtocol { if(is_array($_structure[8][1])) { foreach($_structure[8][1] as $key => $value) { if($key%2 == 0) { - $part->dparameters[strtoupper($_structure[8][1][$key])] = $_structure[8][1][$key+1]; + $part->dparameters[trim(strtoupper($_structure[8][1][$key]))] = $_structure[8][1][$key+1]; } } } @@ -804,7 +804,7 @@ class Net_IMAP extends Net_IMAPProtocol { if(is_array($_structure[8][1])) { foreach($_structure[8][1] as $key => $value) { if($key%2 == 0) { - $part->dparameters[strtoupper($_structure[8][1][$key])] = $_structure[8][1][$key+1]; + $part->dparameters[trim(strtoupper($_structure[8][1][$key]))] = $_structure[8][1][$key+1]; } } } @@ -817,7 +817,7 @@ class Net_IMAP extends Net_IMAPProtocol { if(is_array($_structure[9][1])) { foreach($_structure[9][1] as $key => $value) { if($key%2 == 0) { - $part->dparameters[strtoupper($_structure[9][1][$key])] = $_structure[9][1][$key+1]; + $part->dparameters[trim(strtoupper($_structure[9][1][$key]))] = $_structure[9][1][$key+1]; } } } @@ -850,14 +850,14 @@ class Net_IMAP extends Net_IMAPProtocol { if(is_array($_structure[1])) { foreach($_structure[1] as $key => $value) { if($key%2 == 0) { - $part->parameters[strtoupper($_structure[1][$key])] = $_structure[1][$key+1]; + $part->parameters[trim(strtoupper($_structure[1][$key]))] = $_structure[1][$key+1]; } } } if(is_array($_structure[2])) { foreach($_structure[2] as $key => $value) { if($key%2 == 0) { - $part->parameters[strtoupper($_structure[2][$key])] = $_structure[2][$key+1]; + $part->parameters[strtoupper(trim($_structure[2][$key]))] = $_structure[2][$key+1]; } } }