3

I'm using Magento 2.2.1 CE.I got following error when I opened admin panel

   "0":"Warning: Cannot use a scalar value as an array in 
\\vendor\\magento\\framework\\Session\\SessionManager.php on line 470"

How to solve this ?

1

2 Answers 2

7

It's a Magento bug for not returning array if session has a value.

Temporary fix is, change line 482 to:

return isset($_SESSION[self::HOST_KEY]) ? [$_SESSION[self::HOST_KEY]] : [];
0
1

The fastest way to overcome the issue is to clear site data storage in your browser to refresh a session data

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.