Jump to content

Cannot use a scalar value as an array


Recommended Posts

Hello guys, 

 

I've installed today presta shop on my hosting and after login on my admin painel I keep receiving se follow msg: 

"Warning on the line 66,  domainc.com.br/config/smartyadmin.config.inc.php[2] Cannot use a scalar value as an array."

Also cant close the welcome window if I click on start or later ou close, nothing happens.

 

How can I solve it?

 

Thanks in advanced

 

Caio

 

 

Link to comment
Share on other sites

 

Open the file /config/smartyadmin.config.inc.php from your PrestaShop root directory. And add the following line of code:
 
$class = array();
 
Before (line 65)
 
if (!empty(Context::getContext()->override_controller_name_for_translations)) {
 
This might fix your issue.

 

Problem solved! 

 

Thanks so much :) 

Link to comment
Share on other sites

I have same problem.

 

But for version Prestashop 1.7 the line 66 is different:

 

   $sprintf['legacy'] = $htmlEntities ? 'htmlspecialchars': 'addslashes';

 

and is not working.

 

Can you help, please?

Link to comment
Share on other sites

  • 2 years later...

Hi we have the same problem:

[Mon May 06 15:42:29.001228 2019] [proxy_fcgi:error] [pid 20020] [client 127.0.0.1:33532] AH01071: Got error 'PHP message: PHP Warning:  Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\nPHP message: PHP Warning:  Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\nPHP message: PHP Warning:  Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\nPHP message: PHP Warning:  Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\nPHP message: PHP Warning:  Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\n'

[Mon May 06 15:38:11.556735 2019] [proxy_fcgi:error] [pid 19901] [client 127.0.0.1:33332] AH01071: Got error 'PHP message: PHP Warning:  Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\n', referer: https://domain/admin-dir/index.php?controller=AdminModules&token=1b282cf70da3757bec718b32b59d4338&configure=ps_facetedsearch&tab_module=front_office_features&module_name=ps_facetedsearch

is prestashop 1.7, this is going off since we activate PHP-FPM

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...