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

Edited by servo
Link to comment
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']);
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.