0

It's not duplicated one I think.

Because what I found similar is a little different from the path.

Fatal error: Call to a member function getCode() on boolean in /MagentoProject/app/code/core/Mage/Customer/Model/Session.php on line 71

The code that error message says is that line :

$namespace .= '_' . (Mage::app()->getStore()->getWebsite()->getCode());

How could I solve this? I didn't do anything...

I set the environment

  1. brew install redis
  2. brew install homebrew/php/php56
  3. homebrew/php/php56-mcrypt homebrew/php/php56-opcache homebrew/php/php56-redis
  4. Set virtual host 'ln -s ../sites-available/linkshops2 .'

Is there any specialist at magento who can help me and give me a solution?

UPDATE the point of error is below function __construct()

public function __construct()
{
    $namespace = 'customer';
    if ($this->getCustomerConfigShare()->isWebsiteScope()) {
        $namespace .= '_' . (Mage::app()->getStore()->getWebsite()->getCode());
    }

    $this->init($namespace);
    Mage::dispatchEvent('customer_session_init', array('customer_session'=>$this));
}

2 Answers 2

3

Maybe this problem is with local.xml configuration's file. I had the same problem I fixed creating a new one.

0
0

i searche and found many of the websites this issue is due to compilation.

please visit bellow link for more info.

Error: Fatal error: Call to a member function getCode() on a non-object in ;

I hope this will help you.

5
  • and also print_r($namespace). the value you get is proper or not. Dec 24, 2015 at 10:58
  • 1
    Denish,please donot put link as answer
    – Amit Bera
    Dec 24, 2015 at 11:22
  • i think redundant answer should not be there in site. so i post link which i follow and got solution. Dec 24, 2015 at 11:27
  • 2
    Please post the relevant information from the link, in case it goes offline. Dec 24, 2015 at 14:29
  • @denishvachhani Thank you, I'm trying now. I have a question, the link you posted has a little different path from me... did you have also a different path error but could solve that error by reading that post ?
    – LKM
    Dec 28, 2015 at 1:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.