Let’s initiate a discussion!!
The following error occurs while we using Redis for session storage Or file session storage :
1 |
Warning: Cannot use a scalar value as an array in /home/web/domains/web.com/public_html/vendor/magento/framework/Session/SessionManager.php on line 492 |
– Please follow the below steps to resolve it :
Step 1: Please first override the following file: vendor/magento/framework/Session/SessionManager.php
Step 2: Open SessionManager.php and find following function ‘_getHosts()’ replace below line from this function :
1 |
return $_SESSION[self::HOST_KEY] ?? []; |
replace it with:
1 |
return isset($_SESSION[self::HOST_KEY]) ? [$_SESSION[self::HOST_KEY]] : []; |
That’s it! The error should be solved now.
[crayon-641f0798ded55228588276/] Using above fucntion Images can be imported directly from...
Override view block using di.xml and add the below code...
You can check a list of called layout XML for...
Follow the below steps to install and set up PWA...
If you want to remove all leading zero's from order,...
Let our Magento expert connect to discuss your requirement.
We offer Magento
certified developers.
Our Magento clientele
is 500+.
We sign NDA for the
security of your projects.
We’ve performed 100+
Magento migration projects.
Free quotation
on your project.
Three months warranty on
code developed by us.