RogerB Posted February 20, 2011 Report Posted February 20, 2011 Getting this error when pilots apply. Catchable fatal error: Object of class stdClass could not be converted to string in /home1/pirateai/public_html/kesukvirtual/core/common/PilotGroups.class.php on line 87 Quote
Guest lorathon Posted February 20, 2011 Report Posted February 20, 2011 I looked Roger but I must have changed my PilotGroups.class.php My line 87 looks like this. } Can you post your line 87 and whatever is around it? Quote
RogerB Posted February 20, 2011 Author Report Posted February 20, 2011 here is that whole string /** * Get a group ID, given the name */ public static function getGroupID($groupname) { $sql = 'SELECT groupid FROM ' . TABLE_PREFIX . 'groups WHERE name=\'' . $groupname . '\''; $res = DB::get_row($sql); return $res->groupid; } Quote
Guest lorathon Posted February 20, 2011 Report Posted February 20, 2011 Make sure that the $groupname that is being supplied is a string and not an object. Is this just the standard phpVMS or are there mod's? Quote
Moderators joeri Posted February 20, 2011 Moderators Report Posted February 20, 2011 thats the string after the error is that correct Roger is my line 87 is the closing brasket of the edit group string. gr joeri Quote
RogerB Posted February 20, 2011 Author Report Posted February 20, 2011 This is my line 87....Fresh install 950 WHERE name=\'' . $groupname . '\''; Quote
RogerB Posted February 20, 2011 Author Report Posted February 20, 2011 Tried a file from an earlier version, errors out on line 95... weird.. Quote
Guest lorathon Posted February 20, 2011 Report Posted February 20, 2011 Whatever is sending the $groupname variable looks to be sending an object not a string. Object of class stdClass could not be converted to string Quote
Guest lorathon Posted February 20, 2011 Report Posted February 20, 2011 In the newest version RegistrationData.class.php. Maybe something is wrong here. I dont have 950 installed I just used the github for the code /* Add them to the default group */ $defaultGroup = SettingsData::getSetting('DEFAULT_GROUP'); PilotGroups::AddUsertoGroup($pilotid, $defaultGroup); In version 944 /* Add them to the default group */ PilotGroups::AddUsertoGroup($pilotid, DEFAULT_GROUP); Quote
Administrators Nabeel Posted February 20, 2011 Administrators Report Posted February 20, 2011 Run checkinstall Latest versions (betas) actually check which group you have set as default. Quote
RogerB Posted February 21, 2011 Author Report Posted February 21, 2011 Thanks lorathon, that fixed it. Better put that one in the bug section. Quote
Administrators Nabeel Posted February 21, 2011 Administrators Report Posted February 21, 2011 Do you have versions mixed up? That code was changed in one of the betas Quote
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.