servo Posted August 25, 2015 Share Posted August 25, 2015 (edited) Hey Everyone , Well I'm using IPB forum and I had a Plugin that use give member their color according to their ranks in the links and one day I woke up and saw this error Illegal string offset 'members_seo_name' in \ipb\admin\sources\classes\output\publicOutput.php(3837) : eval()'d code on line 12 and when I disabled the plugin the error went away .... so I contacted the creator of plugin well instead of getting an answer he blamed me that I did something which obviously I did not so getting support from the make is out of question I'm uploading the plugin ... if you guys need any other file pleas let me know I'll upload that one as well Please help me I'll be very grateful Take care All Servo (SOS33) Group Color in User Personal Card Link 1.2.0.zip Edited August 25, 2015 by servo Quote Link to comment https://forums.phpfreaks.com/topic/297919-illegal-string-error/ Share on other sites More sharing options...
requinix Posted August 25, 2015 Share Posted August 25, 2015 The relevant bit in there is either function topic($data, $forum_data, $other_data, $inforum) { $topicc = IPSMember::load( $data['starter_id'] ); $lastp = IPSMember::load( $data['last_poster_id'] ); $starter = IPSMember::makeNameFormatted( $data['starter_name'], $topicc['member_group_id'] ); $lastposter = IPSMember::makeNameFormatted( $data['last_poster_name'], $lastp['member_group_id'] ); $data['starter'] = IPSMember::makeProfileLink($starter , $data['starter_id'] , $topicc['members_seo_name']); $data['last_poster'] = IPSMember::makeProfileLink($lastposter, $data['last_poster_id'], $lastposter['members_seo_name']); return parent::topic($data, $forum_data, $other_data, $inforum); }or function asForumTopics($data) { $topicc = IPSMember::load( $data['starter_id'] ); $lastp = IPSMember::load( $data['last_poster_id'] ); $starter = $this->caches['group_cache'][ $topicc['member_group_id'] ]['prefix'].$data['starter_name'].$this->caches['group_cache'][ $topicc['member_group_id'] ]['suffix']; $lastposter = $this->caches['group_cache'][ $lastp['member_group_id'] ]['prefix'].$data['last_poster_name'].$this->caches['group_cache'][ $lastp['member_group_id'] ]['suffix']; $data['starter'] = IPSMember::makeProfileLink($starter , $data['starter_id'] , $topicc['members_seo_name']); $data['last_poster'] = IPSMember::makeProfileLink($lastposter, $data['last_poster_id'], $lastposter['members_seo_name']); return parent::asForumTopics($data); }I don't know whether you made any changes to the plugin so I won't comment on that, but the two lines involving $lastposter $data['last_poster'] = IPSMember::makeProfileLink($lastposter, $data['last_poster_id'], $lastposter['members_seo_name']);(both identical) are definitely incorrect. $lastposter is always a string (a display name) so $lastposter['members_seo_name'] will not work. They should be using $lastp instead as that's the array of information about a user. $data['last_poster'] = IPSMember::makeProfileLink($lastposter, $data['last_poster_id'], $lastp['members_seo_name']); Quote Link to comment https://forums.phpfreaks.com/topic/297919-illegal-string-error/#findComment-1519628 Share on other sites More sharing options...
servo Posted August 28, 2015 Author Share Posted August 28, 2015 So I need to replace lastposter with lastp rite? Quote Link to comment https://forums.phpfreaks.com/topic/297919-illegal-string-error/#findComment-1519826 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.