Jump to content

Illegal String error!


servo

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/297919-illegal-string-error/
Share on other sites

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']);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.