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

Link to comment
Share on other sites

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;
        }

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.