Jump to content

Error in Tools.php Warning: Illegal offset type in isset or empty in classes/Tools.php on line 1394


ajaykakde21

Recommended Posts

Hi There,

 

 

I am using prestashop 1.6.1.5

 

I have removed id from URL by using cleanurls_v0.42.zip  . Everything is working fine but there is 1 warning

 

Warning: Illegal offset type in isset or empty in /home3/w3g6c9e0/public_html/www.XXX.com/classes/Tools.php on line 1394

 

 

Please help me to remove this warning i am totally confused about it.

 

Thank you so much in adavance.

 

PFA for Tools.php file

Tools(1).php

Link to comment
Share on other sites

1. you can try to replace this line

 

        if (isset($array_str[$str])) {
 
by following line
 
        if (isset($str) &&  isset($array_str[$str])) {
 

2. If everything is really working fine, you can also ignore this warning message

if you disable DEV mode by setting _PS_MODE_DEV_ to false in following file, the warning will not be displayed

 

/config/defines.inc/php,

Link to comment
Share on other sites

  • 1 month later...
  • 6 years later...
On 7/8/2016 at 11:12 AM, skinnybloke said:

 

Does anyone know if this corrected the issue?

    if(is_string($str)){ if(strpos($str,'/')){

        if (isset($array_str[$str])) {
            return $array_str[$str];
        }
    }}

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