Help! Deprecated : Assigning the return value of new by reference

Started on the old forum in January 2012 · view the original in the archive · old links redirect here

4 replies · 546 views · started 14 years ago · 1 min read

4 participants
kruzada Junior · 20 posts #1

Anyone can Help to fix this pls...

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

while viewing my uploaded mp3 file,the error is appeared at the upper part of the page,error says:

Deprecated : Assigning the return value of new by reference is deprecated in / home/dreamwap/ public_html/wap/inc/ pear.inc.php on line 247

I dont kn0w what is the pr0b. in this c0de,why it say deprecated,Pls. Help me to fix..tnx

arnage Lead · 811 posts #2

Of course you don't when you're not even tried to read anything about it and solve the problem. The problem is one single symbol, find it.

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
kruzada Junior · 20 posts #3

hum..sorry bads i am newbie in php,ill fix some deprecated errors that are function but this one is n0t a func so i have n0 idea about the deprecated in return,i cant found any error in line 247..i c0mpare it to next line the missing is $message,but it is not a symbol..pls. help me bads..

ewanz Developer · 187 posts #4

im hate php 5.3 above,,, my recommendation use old version php..

our lfe is simple words.... 😌 http://mygenkz.net ewanz06@yahoo.com

$output="i am NOoob....";
$newfile="ewanz.txt";
$file = fopen ($newfile, "w");
fwrite($file, $output);
fclose ($file); 
just_m3. Developer · 199 posts #5

The & sign tells PHP to return the value as a reference. In PHP 5.3.0 n' higher you don't need it, simply remove that sign from all over the file and try again 😉

This is ten percent luck, twenty percent skill Fifteen percent concentrated power of will Five percent pleasure, fifty percent pain 😂And a hundred percent reason to remember the name!

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close