PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Mail » Mail_mimeDecode » Bug #7242

Mail_mimeDecode: Notice: Uninitialized string offset

Details

Submitted2006-03-29 10:00 UTC
Fromluke dot richards at emailcenteruk dot com
Assignedalan_k
StatusClosed
PackageMail_mimeDecode
PHP Version4.3.11
OSLinux
Roadmaps1.6.0

Comments

[2006-03-29 10:00 UTC] luke dot richards at emailcenteruk dot com

Description:
------------
468c468
< if (is_array($param_value) AND $param_value[0] == '"') {
---
> if ($param_value[0] == '"') {

Test script:
---------------
<?php

require_once("Mail/mimeDecode.php");

// this is an email we received
$string = file_get_contents("http://www.emailcenteruk.com/pear_report/example_email.eml");

$params = array();
$params['include_bodies'] = true;
$params['decode_bodies'] = true;
$params['decode_headers'] = true;

$parser = new Mail_mimeDecode($string);
$structure = $parser->decode($params);

print_r($structure);
?>

Expected result:
----------------
The structure of the email is printed without any errors/notices.

Actual result:
--------------
The structure of the email is printed with the notice:

Notice: Uninitialized string offset: 0 in /usr/share/php/Mail/mimeDecode.php on line 468

[2006-03-29 10:02 UTC] luke dot richards at emailcenteruk dot com

Changed summary to be more descriptive...