
danilcha - 2010-04-07 19:43:03
Hello,
I'm using the latest version of mime_parser.php. I get PHP notice
Uninitialized string offset: 0 in mime_parser.php on line 417
when decoding a message with crappy headers:
| --_----------=_parties_54877eb9e489d85d6c1608e33f64cff2
| Content-Type: text/plain
|
| charset="utf-8"
| Content-Transfer-Encoding: 8bit
The error is in the last line:
Function ParseStructuredHeader($value, &$type, &$parameters, &$character_sets, &$languages)
{
$type = strtolower(trim($this->Tokenize($value, ';')));
$p = trim($this->Tokenize(''));
$parameters = $character_sets = $languages = array();
while(strlen($p))
{
$parameter = trim(strtolower($this->Tokenize($p, '=')));
$remaining = trim($this->Tokenize(''));
if(!strcmp($remaining[0], '"')