Jump to content

Deprecated PEAR Errors after PHP module upgrade from 4.x to v5


n1concepts

Recommended Posts

Hi,

 

Just curious is anyone have suggestions on a permanent fix regarding PEAR error that has popped up for several pages after upgrading PHP from version 4 to 5.

Note: I know the issue is with the 'referenced' not be accepted in the newer version but wanted see if someone had also experienced this issue and if the fix was simply 'removing the ampersand sign (&) from all values in code to resolve the issue.

 

Here's example of error:

 

 

Deprecated: Assigning the return value of new by reference is deprecated in /home/content/p/h/e/dkdke/html/fske/install/PEAR/PEAR.php on line 569

 

Deprecated: Assigning the return value of new by reference is deprecated in /home/content/p/h/e/dkdke/html/fske/install/PEAR/PEAR.php on line 572

I'll post the code since you asked but the error already tells me the issue - I just wanted to hear from others that dealing w/similar issue.

Note: I already know that removing the reference will fix the issue but was curious to hear if doing so creating other issues being the problem is due to PEAR not keeping up with PHP updates.

 

Yes, I know Google provides answers - found my answer from that search - but (again) this is simply to get 'real coders' feedback. :)

But I do appreciate your response and suggestions. :)

 

Here's the code you asked to see - comments welcomed (truly)

 

if ($skipmsg) {
            $a =& new $ec($code, $mode, $options, $userinfo);
            return $a;
        } else {
            $a =& new $ec($message, $code, $mode, $options, $userinfo);
            return $a;
        }

 

remove the ampersand should just be

 

 

if ($skipmsg) {
            $a = new $ec($code, $mode, $options, $userinfo);
            return $a;
        } else {
            $a = new $ec($message, $code, $mode, $options, $userinfo);
            return $a;
        }

 

otherwise you will get deprecated errors.

Yeah, I did and suddenly I get 'blank' pages not - no errors what so ever and I have error_reporting set to display all.

Note: that leads me to think there have been other (custom) edits to this code so I'm discussing w/site owner now.

 

Yes, I confirm your comments - that did fix that problem but now another host of issues... :)

Thanks for response!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.