Jump to content

Php Warning: Illegal Offset


nukua

Recommended Posts

Hi all, i have this error, prestashop ver 1.6.1.4

 

mod_fcgid: stderr: PHP Warning: Illegal offset type in isset or empty in /var/www/vhosts/domain.com/classes/Tools.php on line 1394

Code line 1394-1400

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

        if (!is_string($str)) {
            return false;
        }

Any idea?

Thanks

Link to comment
Share on other sites

  • 1 month later...

Si en mi caso también sucede:
Warning: Illegal offset type in isset or empty in /var/www/htdocs/www.dominio.com/classes/Tools.php on line 1394

 

 public static function str2url($str)
    {
        static $array_str = array();
        static $allow_accented_chars = null;
        static $has_mb_strtolower = null;

        if ($has_mb_strtolower === null) {
            $has_mb_strtolower = function_exists('mb_strtolower');
        }

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

        }

        if (!is_string($str)) {
            return false;
        }

        if ($str == '') {
            return '';
        }

        if ($allow_accented_chars === null) {
            $allow_accented_chars = Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL');
        }

        $return_str = trim($str);

        if ($has_mb_strtolower) {
            $return_str = mb_strtolower($return_str, 'utf-8');
        }
        if (!$allow_accented_chars) {
            $return_str = Tools::replaceAccentedChars($return_str);

 

Alguien lo ha resuelto o puede orientarnos porfavor?

 

Miles de gracias!
 

Edited by jmcollado (see edit history)
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 3 months later...
  • 11 months later...

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