Dave Fischetti wrote:
> Hi all, the other day I received this error for the first time in  
> about a year (I hadn't made any changes to anything). I'm using  
> ezcomponents-2007.2.1
> 
> Fatal error: Argument 2 passed to ezcMail::walkParts() must not be  
> null, called in /usr/include/php/ezcomponents-2007.2.1/Mail/src/ 
> mail.php on line 438 and defined in /usr/include/php/ 
> ezcomponents-2007.2.1/Mail/src/mail.php on line 430
> 
> 
> here is the email that I believe caused it, but I'm not sure. There  
> was no body to the email. The user just sent a subject. I've had that  
> before without error so i don't think that caused it:
> 
> 
> Received: (qmail 27779 invoked from network); 5 Jul 2008 17:02:35 -0400
> Received: from mailgate1.domain.com (HELO domain.com) (xx.xxx.xx.xxx)
>   by mydomain.com with (DHE-RSA-AES256-SHA encrypted) SMTP; 5 Jul 2008  
> 17:02:35 -0400
> Received-SPF: pass (mydomain.com: local policy designates  
> xx.xxx.xx.xxx as permitted sender)
> Received: from ([12.165.36.249])
>       by mailgate1.domain.com with ESMTP  id KP-BPZGN.208254597;
>       Sat, 05 Jul 2008 17:02:15 -0400
> Subject: Yes
> From: [EMAIL PROTECTED]
> Date: Sat, 5 Jul 2008 17:02:19 -0400
> To: [EMAIL PROTECTED]
> Importance: Normal
> Message-ID: <[EMAIL PROTECTED]>
> X-MIMETrack: Serialize by Router on ETCSPLNG103/MAIL/CCE(Release 7.0.3| 
> September 26, 2007) at
> 07/05/2008 05:02:22 PM
> MIME-Version: 1.0
> 
> 
> 
> I'd appreciate any help trying to see what caused this.

Hi Dave,

The error is most likely caused by an empty body in the mail. Mail 
bodies are optional according to RFC2822, so it looks like a bug. I 
opened an issue for it (http://issues.ez.no/13329) and a fix is already 
in SVN.

If you cannot upgrade your eZ Components version (I see you still use 
2007.2.1) you can add the fix yourself in mail.php:

mail.php, line 433:
<code>
             case 'ezcMail':
             case 'ezcMailComposer':
                 $this->walkParts( $context, $mail->body );
                 break;
</code>

will become:
<code>
             case 'ezcMail':
             case 'ezcMailComposer':
                 if ( $mail->body !== null )
                 {
                     $this->walkParts( $context, $mail->body );
                 }
                 break;
</code>

Hope this helps.

Cheers,
Alex.

-- 
Alexandru Stanoi
eZ Components System Developer
eZ Systems | http://ez.no
-- 
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components

Reply via email to