Page 1 of 1

PHP 5 Code for $this = NULL

Posted: Mon Dec 20, 2004 8:16 pm
by neophyte
I'm just wondering what the PHP 5 Code for $this = NULL inside of a class would be? I've never seen this before. But I saw it today inside of the fileupload class in osCommerce. It would seem that it is trying to destroy an instantiated object by Nulling it? .....??? :roll: :oops:

Posted: Mon Dec 20, 2004 11:10 pm
by timvw
[php_man]language.oop5.basic[/php_man]

afaik you should use only $this if you need a reference to the current object. I don't think dereferencing $this will actually work... (might be mistaken here)

Posted: Tue Dec 21, 2004 12:09 am
by andre_c
I have had that problem with oscommerce, i don't know what the right thing to do is but i have heard that you can just remove that line.

Thanks

Posted: Tue Dec 21, 2004 8:31 am
by neophyte
That's what we did we just commented it out. I just wasn't sure if it was a good idea to leave it that way in osCommerce. Thanks for the tips guys....