Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.0
Author Message
jaded
Theme Guru



Joined: Nov 01, 2003
Posts: 1006

PostPosted: Wed Feb 07, 2007 7:17 am Reply with quote

Fatal error: Cannot re-assign $this in /home/****/public_html/admin/modules/approvemembers.php on line 145


This error just started on a clients site. Here is a copy of the file. I have searched for a way to fix this but to no avail. I am hoping that one of you will be able to take the time to help me get this sorted. Thank you in advance.
[ Only registered users can see links on this board! Get registered or login! ]

I think that this might be a php5 related error but that is just an educated guess.

_________________
Themes BB Skins [ Only registered users can see links on this board! Get registered or login! ]
Graphic Tees [ Only registered users can see links on this board! Get registered or login! ]
Paranormal Tees [ Only registered users can see links on this board! Get registered or login! ]
Ghost Stories & More [ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Wed Feb 07, 2007 8:22 am Reply with quote

The $this variable is used in object oriented PHP. Does this code predate the version of PHP that introduced classes and OO? It kind of looks like it. Just rename the $this variable to something else....maybe $that. Smile

_________________
GCalendar - An Event Calendar for PHP-Nuke
Member_Map - A Google Maps Nuke Module 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Wed Feb 07, 2007 10:17 am Reply with quote

$this should never be used as a variable name except in a class structure, which your file is not. If it is used on a version 5.x site, it will not work as v5.x does not allow you to use reserved words as variable names although v4.x and down does.
 
View user's profile Send private message
jaded







PostPosted: Wed Feb 07, 2007 5:17 pm Reply with quote

okay, thank you both. Renaming it seems to have worked. I guess someone should update those "approve members" modules one day.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.0

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©