Package: ilohamail
Version: 0.8.14-0rc3sid6.1
Severity: important
I think this may have come about with the latest bump in PHP versions,
and I had patched it once, but it's reared its head again with an
update to IlohaMail.
This time I've captured a proper patch for IlohaMail to make it work,
though I'm not really a PHP coder.
IlohaMail stopped rendering some emails (likely multipart), and I'd see
these errors in apache's error.log:
PHP Warning: strcasecmp() expects parameter 1 to be string, array
given in /usr/share/IlohaMail/include/mime.inc on line 87
PHP Warning: strcasecmp() expects parameter 1 to be string, array
given in /usr/share/IlohaMail/include/mime.inc on line 121
PHP Warning: strcasecmp() expects parameter 1 to be string, array
given in /usr/share/IlohaMail/include/mime.inc on line 106
Here's my patch that seems to have gotten it working again. It checks
that the input to strcasecmp will not be an array in the problem spots.
--- mime.inc.bak 2010-03-16 13:35:29.000000000 -0400
+++ mime.inc 2010-03-16 16:33:05.000000000 -0400
@@ -84,7 +84,9 @@
$line = str_replace(")(", ") (", $line);
$struct = iml_ParseBSString($line);
- if ((strcasecmp($struct[0], "message")==0) && (strcasecmp($struct[1],
"rfc822")==0)){
+ if (!is_array($struct[0]) && (strcasecmp($struct[0], "message")==0)
+ && !is_array($struct[1])
+ && (strcasecmp($struct[1], "rfc822")==0)){
$struct = array($struct);
}
return $struct;
@@ -97,13 +99,15 @@
$pos = strpos($part, ".");
$rest = substr($original_part, $pos+1);
$part = substr($original_part, 0, $pos);
- if ((strcasecmp($a[0], "message")==0) && (strcasecmp($a[1],
"rfc822")==0)){
+ if (!is_array($a[0]) && (strcasecmp($a[0], "message")==0)
+ && !is_array($a[1]) && (strcasecmp($a[1], "rfc822")==0)){
$a = $a[8];
}
//echo "m - part: $original_part current: $part rest: $rest
array: ".implode(" ", $a)."<br>\n";
return iml_GetPartArray($a[$part-1], $rest);
- }else if ($part>0){
- if ((strcasecmp($a[0], "message")==0) && (strcasecmp($a[1],
"rfc822")==0)){
+ } else if ($part>0) {
+ if (!is_array($a[0]) && (strcasecmp($a[0], "message")==0)
+ && !is_array($a[1]) && (strcasecmp($a[1], "rfc822")==0)){
$a = $a[8];
}
//echo "s - part: $part rest: $rest array: ".implode(" ",
$a)."<br>\n";
@@ -118,7 +122,10 @@
if (is_array($a)){
$parent=iml_GetPartArray($a, $part);
- if ((strcasecmp($parent[0], "message")==0) &&
(strcasecmp($parent[1], "rfc822")==0)){
+ if (!is_array($parent[0])
+ && (strcasecmp($parent[0], "message")==0)
+ && !is_array($parent[1])
+ && (strcasecmp($parent[1], "rfc822")==0)){
$parent = $parent[8];
}
@@ -258,7 +265,9 @@
if ((is_array($part_a[$id])) &&
(is_array($part_a[$id][1]))){
$array = $part_a[$id][1];
while ( list($key, $val) = each($array)){
- if ((strcasecmp($val, "NAME")==0)||(strcasecmp($val,
"FILENAME")==0))
+ if (!is_array($val)
+ && ((strcasecmp($val, "NAME")==0)
+ || (strcasecmp($val, "FILENAME")==0)))
$name=$array[$key+1];
}
}
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.18.8-xenU (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages ilohamail depends on:
ii apache2-mpm-prefork [httpd] 2.2.15-2 Apache HTTP Server - traditional n
ii debconf [debconf-2.0] 1.5.28 Debian configuration management sy
ii libapache2-mod-php5 5.3.2-1 server-side, HTML-embedded scripti
ii php5 5.3.2-1 server-side, HTML-embedded scripti
ii sendmail-bin [mail-transport- 8.14.3-9.1 powerful, efficient, and scalable
ii wwwconfig-common 0.2.1 Debian web auto configuration
Versions of packages ilohamail recommends:
ii aspell 0.60.6-4 GNU Aspell spell-checker
ii gnupg 1.4.10-2 GNU privacy guard - a free PGP rep
ii mysql-client 5.1.44-3 MySQL database client (metapackage
ii mysql-client-5.1 [mysql-clien 5.1.44-3 MySQL database client binaries
ii php5-mysql 5.3.2-1 MySQL module for php5
ilohamail suggests no packages.
-- debconf information:
* ilohamail/webserver_type: Apache2
* ilohamail/weblocation: /IlohaMail
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]