[imp] terminate UTF7-IMAP string in US-ASCII state
Wenzhuo Zhang
wenzhuo at zhmail.com
Mon May 24 03:20:17 PDT 2004
Hi,
It just came to me that it would be a little better to chop the last
character after error checking.
Patch against the previous change:
--- imp-3.2.3/lib/IMP.php.utf7-imap 2004-05-24 16:10:38.000000000 +0800
+++ imp-3.2.3/lib/IMP.php 2004-05-24 18:06:44.000000000 +0800
@@ -1266,9 +1266,10 @@
if (extension_loaded('iconv')) {
ini_set('track_errors', 1);
$output = @iconv($charset, 'UTF7-IMAP', $input . 'a');
- $output = substr($output, 0, -1);
if (isset($php_errormsg)) {
$output = false;
+ } else {
+ $output = substr($output, 0, -1);
}
ini_restore('track_errors');
}
Sorry for the quick change.
Wenzhuo
On Mon, May 24, 2004 at 11:16:04AM +0200, Jan Schneider wrote:
> Zitat von Wenzhuo Zhang <wenzhuo at zhmail.com>:
>
> >The following two liner patch makes sure that UTF7-IMAP strings always
> >end in US-ASCII state as required by RFC2060.
>
> Committed, thanks.
>
> Jan.
>
> --
> Do you need professional PHP or Horde consulting?
> http://horde.org/consulting.php
> --
> IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org
--
Wenzhuo
GnuPG Key ID 0xBA586A68
Key fingerprint = 89C7 C6DE D956 F978 3F12 A8AF 5847 F840 BA58 6A68
More information about the imp
mailing list