PHP 5.3 warning in rcube_imap.php
|Reported by:||iezzip||Owned by:|
Under very rare circumstances I am experiencing the following:
PHP Warning: strtolower() expects parameter 1 to be string, array given in /.../roundcube/program/include/rcube_imap.php on line 1285
This only happens under PHP 5.3.0, AFAIK not in 5.2.11
The relevant line in program/include/rcube_imap.php:
// fetch message headers if message/rfc822 or named part (could contain Content-Location header) if (strtolower($part[$i]) == 'message' ||
I was able to reproduce it on an HTML-email of a customer. Here's the offending var_export($part[$i]):
array ( 0 => 'TEXT', 1 => 'PLAIN', 2 => array ( 0 => 'CHARSET', 1 => 'iso-8859-1', ), 3 => 'NIL', 4 => 'NIL', 5 => '7BIT', 6 => '4055', 7 => '82', 8 => 'NIL', 9 => 'NIL', 10 => 'NIL', )
Usually, $part[$i] should just contain 'TEXT'.
Hope you find a solution for that. I cannot offer a patch as I don't really understand that part of code.