Jump to content

Fatal error: Undefined class constant 'MODE_CONTRIB' in/classes/controller/AdminController.php on li


Recommended Posts

when i upgrade ps 1.6.0.9 to 1.6.0.11,and login addons,then tell me

 Fatal error: Undefined class constant 'MODE_CONTRIB' in/classes/controller/AdminController.php on line 405

 

so i disenable this code:

// Set context mode
        /*
		if (defined('_PS_HOST_MODE_') && _PS_HOST_MODE_)
		{
			if (isset($this->context->cookie->is_contributor) && (int)$this->context->cookie->is_contributor === 1)
				$this->context->mode = Context::MODE_CONTRIB_HOST;
			else
				$this->context->mode = Context::MODE_HOST;
		}
		elseif (isset($this->context->cookie->is_contributor) && (int)$this->context->cookie->is_contributor === 1)
			$this->context->mode = Context::MODE_CONTRIB;
		else
			$this->context->mode = Context::MODE_STD;
        */

this is bug? or how can i fix it?

 

Link to comment
Share on other sites

How to fix Line 396 - 407

    // Set context mode
    if (defined('_PS_HOST_MODE_') && _PS_HOST_MODE_)
    {
    if (isset($this->context->cookie->is_contributor) && (int)$this->context->cookie->is_contributor === 1)
    $this->context->mode = Context::MODE_HOST_CONTRIB;
    else
    $this->context->mode = Context::MODE_HOST;
    }
    elseif (isset($this->context->cookie->is_contributor) && (int)$this->context->cookie->is_contributor === 1)
    $this->context->mode = Context::MODE_STD_CONTRIB;
    else
    $this->context->mode = Context::MODE_STD;

Edited by Bestimweb24 (see edit history)
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...