andy's php projects
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Script and site usage:
All of the scripts on this site are provided free for non-commerical, personal or non-profit use. If you find these scripts useful to you, appreciate the free support, or are just an all round nice person, then why not donate a little dosh? If you wish to use any of these in a commercial system, please refer to the payment plan.


Might Be Me Being Stupid but.....

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> Image Functions
View previous topic :: View next topic  
Author Message
DHR
Newbie


Joined: 20 Feb 2005
Posts: 1

PostPosted: Sun Feb 20, 2005 9:06 am    Post subject: Might Be Me Being Stupid but..... Reply with quote

As far as i'm aware i have everything set up correctly. I have a problem thoguh, no matter what function within the class i try to run I always get this same error

Code:
Fatal error: Cannot re-assign $this in /srv/www/htdocs/class.image.php on line 569


Any assistance would be great.

Thanks.
Back to top
View user's profile Send private message MSN Messenger
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Sun Feb 20, 2005 11:41 am    Post subject: Reply with quote

Hi DHR, and welcome to the board!

Did you instantiate the class with something like:

$img =& new Image();

?

If so, you don't need to. The methods in the class can be statically used, such as:

Image::colourRange(...);

When creating an instance of a class it has a built in variable called '$this' which refers to itself. However, the colourRange method also has a variable called $this.

Two ways to cure the problem:

Don't create an instance.
Rename the variable.

I'll upload a new version of the class to rename that variable anyway, just so others don't get the same problem.

Regards,

Andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
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.    php.amnuts.com Forum Index -> Image Functions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group