Undefined Error

lindaneale 24 Jun, 2008
Hi have a licensed version 2.3.8 with the mambot installed on Joomla 1.0.13. Keep getting the following error message:

Notice: Undefined variable: imver in /home/website/public_html/consideredresponse.co.uk/mambots/content/chronocontact.php on line 200

So I uninstalled and downloaded and installed the latest version 2.3.9 but get the same error message. I don't have spam protection enabled (don't need it as this form is hidden behind a login). I've turned off error reporting in Joomla Configuration but still get the error.
Please can anyone help?
Thanks
GreyHead 25 Jun, 2008
Hi lindaneale,

Insert a new line just before line 200:
$imver = "";


Bob
lindaneale 25 Jun, 2008
Hi Bob
Thanks for you response. I assume you mean before line 200 of the mambots/content/chronocontact.php file? If so I've tried it and it breaks my site so I can't get my home page to appear. I'm probably being dense but can you give me some further help.
Many thanks
GreyHead 25 Jun, 2008
Hi lindaneale,

Apologies - my typo. Trying to answer too many questions before lunch - that should be an = not -

I'll go back and fix it in my post.

Bob
lindaneale 25 Jun, 2008
Thanks Bob
Much appreciated. My site still works but (sorry) now I get the same error but mentioning line 199. Have I done this right?

/**********************************************************/
$rows[0]->html = str_replace('{imageverification}',$imver,$rows[0]->html);
$imver = "";
eval( "?>".$rows[0]->html );
?>

Sorry to be a pain but I'm struggling with this.
Thanks
GreyHead 25 Jun, 2008
Hi lindaneale,

It needs to be before the variable is used, not after

$imver = "";
$rows[0]->html = str_replace('{imageverification}',$imver,$rows[0]->html);
eval( "?>".$rows[0]->html );
?>
All that this does is to assign the variable a value - in this case nothing, before it's called in the funtion.

PHP now checks all of these as they could *possibly* be a problem. Either you turn down error reporting so they don't show or make sure that the variables are pre-declared.

Bob
lindaneale 26 Jun, 2008
Hey Bob
Thank you for your help and your patience to a non-php eejit.
That has done the trick.
Thanks again.
This topic is locked and no more replies can be posted.