Effects problem.. in the view profile bit..


  -----  
Author Message

LifeBlade
Member

Thu Feb 15, 2007 11:00 pm   Post subject: Effects problem.. in the view profile bit..
hi all!

I've been using the effects shop mod for a bit.. and this just suddenly came up..
My problem is this.. It didn't used to be here.. it just started to show.. for newly registered users.. On their "profiles" page.. it shows this error..


Code:

Warning: Illegal offset type in isset or empty in /www/110mb.com/f/o/u/r/4/s/w/o/four4swords/htdocs/phpBB2/mods/shopaddons/effects.php on line 894

Warning: Illegal offset type in /www/110mb.com/f/o/u/r/4/s/w/o/four4swords/htdocs/phpBB2/mods/shopaddons/effects.php on line 897

Warning: Illegal offset type in isset or empty in /www/110mb.com/f/o/u/r/4/s/w/o/four4swords/htdocs/phpBB2/mods/shopaddons/effects.php on line 894

Warning: Illegal offset type in /www/110mb.com/f/o/u/r/4/s/w/o/four4swords/htdocs/phpBB2/mods/shopaddons/effects.php on line 897



It works fine for all the others.. it's just the newly registered ones..
What can i do to remove this error?
 

Thoul
Administrator

Fri Feb 16, 2007 10:21 am   Post subject: Re: Effects problem.. in the view profile bit..
Can you save a copy of your includes/usercp_viewprofile.php file as a txt file, upload that, and post a link to it, please? I'd like to check it to see if there's something in there that might cause this.
 

LifeBlade
Member

Fri Feb 16, 2007 4:40 pm   Post subject:
 

Thoul
Administrator

Sun Feb 18, 2007 1:29 pm   Post subject: Re: Effects problem.. in the view profile bit..
That looks fine, so no problem there as far as I can see. Let's try a little change to mods/shopaddons/effects.php. In that file, find:

Code:

   function cache_user($user_id)
   {
      if( !isset($this->users[$user_id]) )
      {
         $user = get_userdata($user_id);
         $this->users[$user_id] = $user;
      }
      else
      {
         $user = $this->users[$user_id];
      }
      return $user;
   }


Replace it with:

Code:

   function cache_user($user_id)
   {
      if( empty($user_id) )
      {
         return array();
      }
     $user_id = intval($user_id);
      if( !isset($this->users[$user_id]) )
      {
         $user = get_userdata($user_id);
         $this->users[$user_id] = $user;
      }
      else
      {
         $user = $this->users[$user_id];
      }
      return $user;
   }


Let me know how that works for you.

Last edited by Thoul on Sun Feb 25, 2007 11:25 pm; edited 1 time in total
 

LifeBlade
Member

Sun Feb 18, 2007 11:01 pm   Post subject:
Well.. um.. That kind of wipes out my entire page.. Now.. all pages don't even load.. only the header loads.. and everything else is just white..

I'm going to try and do a complete reinstall.. I'll tell you what happens next.. cause it used to work.. but it just stopped working..
 

LifeBlade
Member

Sun Feb 25, 2007 10:48 pm   Post subject:
I did a new install of it.. and it still comes up..

I did that little change.. and this error comes up everytime i try to access the memberlist profiles and whenever to view a post..

Code:

Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /backup/home3/four4swo/public_html/phpBB2/mods/shopaddons/effects.php on line 893
 

Thoul
Administrator

Sun Feb 25, 2007 11:26 pm   Post subject: Re: Effects problem.. in the view profile bit..
Okay, I edited the code in my previous post. Try the new version and let me know how that works out.
 

LifeBlade
Member

Sun Feb 25, 2007 11:39 pm   Post subject: Re: Effects problem.. in the view profile bit..
Yep! that did the trick!

Thanks a lot!
 

Page 1 of 1
Display posts from previous: