Jump to content

php 5 deprecation


arfa

Recommended Posts

Going back to an old script after upgrading to php5...

This is not my code - PEAR.PHP - used as part of a backup script I wrote/modded

 

___________________

The relevant comment in the script

* IMPORTANT! To use the emulated destructors you need to create the

* objects by reference: $obj =& new PEAR_child;

_________________

The error msg in the browser

Deprecated: Assigning the return value of new by reference is deprecated in C:\Program Files\EasyPHP-5.3\www\brama\backup\PEAR.php on line 562

 

Deprecated: Assigning the return value of new by reference is deprecated in C:\Program Files\EasyPHP-5.3\www\brama\backup\PEAR.php on line 565

 

__________________

The relevant code line in the script.

  if ($skipmsg) {

  562        $a = & new $ec($code, $mode, $options, $userinfo);

            return $a;

        } else {

  565        $a = & new $ec($message, $code, $mode, $options, $userinfo);

            return $a;

        }

 

I have had a few blips going to ver5 but this one I can't seem to rectify.

 

Any leads welcome. Thanks

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.