tags:

views:

109

answers:

4

The problem is:

Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\FlashChat_v607\chat\inc\common.php on line 155

Notice: Undefined variable: step in C:\wamp\www\FlashChat_v607\chat\inc\common.php on line 94

This is the link where you can find the code: http://www5.zippyshare.com/v/3592861/file.html

+6  A: 

This line:

$GLOBALS['fc_config']['bot'] =& new Bot();

Should be this:

$GLOBALS['fc_config']['bot'] = new Bot();

And the notice on line 94:

if ( $step > 2 || !isset($step) )

That you can probably ignore. You are checking the value of $step, but you never defined that variable. However, since you also explicitly check if it isset I'm guessing you should be fine. Might be better to check isset first though.

Regardless, these are both minor problems. Sounds like the real problem might be that you have E_NOTICE, E_DEPRECATED and error display enabled on a production server, which would be messing up your page displays with error messages.

Try changing the error display options in your php.ini so those don't display (although you would probably want to leave them on for a development box)

Eric Petroelje
I will prove it now,hang on )
Marin
Thank you so much:))It worked perfectly:)))Thankssssssssssss:)))
Marin
Can you plz help me to the next post I made?
Marin
+2  A: 

The "Assigning the return value of new by reference" is because this idiom is in your code

$foo = &new Bar;

Change it to

$foo = new Bar;

To see why this idiom was used in PHP4, see this manual page.

Paul Dixon
Thnx,I solved it but I had another problem,see the post below!Thank you so much;)
Marin
+1  A: 

The NOTICE on line 94 is because...

if ( $step > 2 || !isset($step) )

Should be:

if (!isset($step) || $step > 2 )

This is because you always want to check if the variable exists FIRST, and then check any other values. If $step isn't set, you'll get the NOTCIE you received.

liquidleaf
Thank you so much,the fist worked perfectly:))I'm going to prove the next:)))Plz hang on:)Thank you so muchhhhh:)))
Marin
Wowwwwwww,,,,you are genioussss,,,,plz can you help me with another part???Plz
Marin
I have this problem:Notice: Undefined index: name in C:\wamp\www\FlashChat_v607\chat\inc\include_themes.php on line 10Notice: Undefined index: name in C:\wamp\www\FlashChat_v607\chat\inc\include_themes.php on line 10Notice: Undefined index: name in C:\wamp\www\FlashChat_v607\chat\inc\include_themes.php on line 10Notice: Undefined index: name in C:\wamp\www\FlashChat_v607\chat\inc\include_themes.php on line 10and the link of the code is:http://www12.zippyshare.com/v/6624883/file.html
Marin
A: 

I have this problem: Notice: Undefined index: name in C:\wamp\www\FlashChat_v607\chat\inc\include_themes.php on line 10 Notice: Undefined index: name in C:\wamp\www\FlashChat_v607\chat\inc\include_themes.php on line 10 Notice: Undefined index: name in C:\wamp\www\FlashChat_v607\chat\inc\include_themes.php on line 10 Notice: Undefined index: name in C:\wamp\www\FlashChat_v607\chat\inc\include_themes.php on line 10 and the link of the code is: www12.zippyshare.com/v/6624883/file.html

Plz help:(

Marin
Here is the code:<?php $pathThemes = INC_DIR . "themes"; $d = dir($pathThemes); while (false !== ($entry = $d->read())) { $fileInfo = pathinfo($pathThemes . '/' . $entry); if ('php' == $fileInfo['extension']) { include_once($pathThemes . '/' . $entry); $name = $fileInfo['filename']; if (!$GLOBALS['fc_config']['themes'][$name]['name']) { unset($GLOBALS['fc_config']['themes'][$name]); } } }?>where is the problem plz?
Marin
You did the right thing and posted this as a new question. Now you should delete this post; it is not an answer.
Tyler McHenry