opsman Posted December 13, 2017 Report Share Posted December 13, 2017 (edited) Hi Apologies as I'm new to PHPVMS but I'm getting the following error message in the admin center and I'm not sure whats causing it... Warning: Illegal string offset 'group_add' in /core/common/PilotData.class.php on line 359 Warning: Illegal string offset 'group_remove' in /core/common/PilotData.class.php on line 365 Im on phpVMS version 2.1.936 and here is the code below from /core/common/PilotData.class.php Any help or support would be greatly appreciated! /** * Update a pilot, $params is an array of column_name=>value * * @param mixed $pilotid This is a description * @param mixed $params This is a description * @return mixed This is the return value description * */ public static function updateProfile($pilotid, $params) { /*$params = array( 'pilotid' => '', 'code' => '', 'email' => '', 'location' => '', 'hub' => '', 'bgimage' => '', 'retired' => false, ); */ if(empty($pilotid)) { return false; } if (!is_array($params)) { return false; } /* Cleanup any specific parameters */ if (isset($params['location'])) { $params['location'] = strtoupper($params['location']); } if (isset($params['pilotid'])) { unset($params['pilotid']); } $sql = "UPDATE " . TABLE_PREFIX . "pilots SET "; $sql .= DB::build_update($params); $sql .= " WHERE `pilotid`={$pilotid}"; $res = DB::query($sql); if (DB::errno() != 0) { return false; } # Auto groups? $groups = Config::get('PILOT_STATUS_TYPES'); if(isset($params['retired'])) { $info = $groups[$params['retired']]; # Automatically add into these groups if(is_array($info['group_add']) && count($info['group_add']) > 0) { foreach($info['group_add'] as $group) { PilotGroups::addUsertoGroup($pilotid, $group); } } if(is_array($info['group_remove']) && count($info['group_remove']) > 0) { foreach($info['group_remove'] as $group) { PilotGroups::removeUserFromGroup($pilotid, $group); } } } return true; } Edited December 22, 2017 by opsman Update to description Quote Link to comment Share on other sites More sharing options...
opsman Posted December 22, 2017 Author Report Share Posted December 22, 2017 never mind, I did a fresh install and no longer get this error Quote Link to comment Share on other sites More sharing options...
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.