Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cannot Re-assign $this


lsd_se

Recommended Posts

Hi

 

I was deleting some product attributes when suddenly I got this error:

 

 

Fatal error: Cannot re-assign $this in /home/******/public_html/***********/admin/includes/classes/upload.php on line 31

 

The line it is referring to is:

class upload {

var $file, $filename, $destination, $permissions, $extensions, $tmp_filename, $message_location;

 

function upload($file = '', $destination = '', $permissions = '777', $extensions = '') {

$this->set_file($file);

$this->set_destination($destination);

$this->set_permissions($permissions);

$this->set_extensions($extensions);

 

$this->set_output_messages('direct');

 

if (tep_not_null($this->file) && tep_not_null($this->destination)) {

$this->set_output_messages('session');

 

if ( ($this->parse() == true) && ($this->save() == true) ) {

return true;

} else {

// self destruct

$this = null;

 

return false;

}

}

}

 

I have had no problems with my oscommerce at all, and I didn't change any files tonight, just deleting some unused attributes.

It happened so suddenly that it really surprised me and has me stumped.

I cannot go into my admin->catalog anymore

 

Any ideas on what I should do?

 

Thanks for any suggestions!

Daryl

Link to comment
Share on other sites

Ask your host to reload the site before you deleted the items,

they should have a back up of a day or so ago, Ralph

Link to comment
Share on other sites

Remove the line
$this = null;

It is a known problem. You can see the fix in the latest oscommece package.

 

Jack

 

Jack, that fix worked perfectly, I'm glad it was so easy to fix.

Thanks for your reply, it is much appreciated, you are certainly a great benefit to this community. Thanks!

Link to comment
Share on other sites

You're welcome and thanks. :) You will pobably find that you have other problems fixed by the update so you may want to keep it handy, if not just go ahead and install it.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...