NYCPHP Meetup

NYPHP.org

[nycphp-talk] Baffling PEAR mail_mime error return by ref errors

Cliff Hirsch cliff at pinestream.com
Sun Oct 15 13:53:41 EDT 2006


I have the latest version of mail_mime and it still generates errors.
I just modified the code, because I like E_NOTICE on during development.
But I also changed my error handler to add the error type as follows:

Error number: 8 
Error type: e_notice

Error number: 8 is meaningless to me -- and scary. Error type: e_notice
is meaningful and lets me sleep better.

Cliff

-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
On Behalf Of Dell Sala
Sent: Sunday, October 15, 2006 8:55 AM
To: NYPHP Talk
Subject: Re: [nycphp-talk] Baffling PEAR mail_mime error

This is a new error notice that was added in php 4.4. You or your  
host must have just upgraded php to 4.4.

The notice is generated for any functions that attempt to return the  
value of an expression as a reference. Apparently it doesn't work and  
the returned value will not be a reference, so the notice was added  
in php 4.4. PEAR Mail_Mime may have been have been updated to fix  
this problem. Make sure you upgrade to the latest version.

Here's more info on the new notice:

http://www.sitepoint.com/blogs/2005/07/30/php-44-minor-gotcha/

I'm curios to hear how others have been dealing with this issue. It's  
cause a lot of what I thought was well written code to start  
generating notices, (which in my mind are errors).

-- Dell

On Oct 15, 2006, at 8:29 AM, Cliff Hirsch wrote:

> I have been using Mail/mime for some time, but it recently started  
> generating the following error. Has anyone seen this? I am  
> completely stumped.
>
> ERRNO: 8
> TEXT: Only variable references should be returned by reference
>
> LOCATION: C:\Program Files\xampp\php\pear\Mail\mime.php, line 375,  
> at October 15, 2006, 8:14 am
>
>
> ERRNO: 8
> TEXT: Only variable references should be returned by reference
>
> LOCATION: C:\Program Files\xampp\php\pear\Mail\mime.php, line 593,  
> at October 15, 2006, 8:14 am





More information about the talk mailing list