Fatal Error: smf.php line 29

Started by hungup, October 26, 2005, 05:29:27 PM

Previous topic - Next topic

hungup

Hi,

Everything installed perfectly.  I only have this error popup on the website which I click the forum menu item and it brings up the forum in the wrapper.

I am using Joomla v1.0.3, smf_1-1-rc1_install, and JoomlaSMFForum_1.0.2.

Notice: Undefined index: action in d:\easyphp1-8\www\components\com_smf\smf.php on line 29

I took a look at the code and this is what line 29 is:

/*1.3.2:sync smf userdata to mos / pass is dummy*/
if ( $_GET['action'] == "profile2" )  {
   updateMOSfromSMF($_REQUEST['userID'], $_REQUEST['realName'], $_REQUEST['emailAddress'], $_REQUEST['passwrd2']);
}

Anybody have any reason as to why this is the problem...other than that the thing works like a charm...so far...  :)

Orstio

You should make sure that it checks whether or not there is a $_GET['action'] first:

if ( isset($_GET['action']) && $_GET['action'] == "profile2" )  {
   updateMOSfromSMF($_REQUEST['userID'], $_REQUEST['realName'], $_REQUEST['emailAddress'], $_REQUEST['passwrd2']);
}

hungup

I'll be honest with and say that I have no idea what you are talking about....I don't know much about PHP code...but I know how to hunt parts of the code that's giving me trouble and sometimes I can decipher what's going on...

Would you be so kind to explain this in layman terms?  Thanks....

Orstio

Just change this:

if ( $_GET['action'] == "profile2" )  {
   updateMOSfromSMF($_REQUEST['userID'], $_REQUEST['realName'], $_REQUEST['emailAddress'], $_REQUEST['passwrd2']);
}


to this:

if ( isset($_GET['action']) && $_GET['action'] == "profile2" )  {
   updateMOSfromSMF($_REQUEST['userID'], $_REQUEST['realName'], $_REQUEST['emailAddress'], $_REQUEST['passwrd2']);
}

Advertisement: