arfa Posted March 7, 2012 Share Posted March 7, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/258482-php-5-deprecation/ Share on other sites More sharing options...
scootstah Posted March 7, 2012 Share Posted March 7, 2012 Remove the "&" before "new". Quote Link to comment https://forums.phpfreaks.com/topic/258482-php-5-deprecation/#findComment-1324963 Share on other sites More sharing options...
arfa Posted March 7, 2012 Author Share Posted March 7, 2012 hey scootstah.! Barely had I found the flash plugin for firefox - I turn around and - presto - the answer to my problem. Totally worked. Many thanks. Quote Link to comment https://forums.phpfreaks.com/topic/258482-php-5-deprecation/#findComment-1324969 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.