未定义的索引:desclength

时间:2015-09-20 15:22:33

标签: prestashop

我在Prestashop 1.6.1.0 Stats> Catalog Evaluation中得到了这个通知。

Notice: Undefined index: desclength_zh in /var/www/1cdeli.com.cn/public_html/modules/statscheckup/statscheckup.php on line 259

Notice: Undefined index: desclength_en in /var/www/1cdeli.com.cn/public_html/modules/statscheckup/statscheckup.php on line 259

在从1.6.0.14更新之前我遇到了同样的问题。

1 个答案:

答案 0 :(得分:0)

控制你拥有相同的最新版本模块,如下所示:

            foreach ($descriptions as $description)
            {
                if (isset($description['iso_code']) && isset($description['description']))
                    $row['desclength_'.$description['iso_code']] = Tools::strlen(strip_tags($description['description']));
                if (isset($description['iso_code']))
                {
                    $scores['description_'.$description['iso_code']] = ($row['desclength_'.$description['iso_code']] < Configuration::get('CHECKUP_DESCRIPTIONS_LT') ? 0 : ($row['desclength_'.$description['iso_code']] > Configuration::get('CHECKUP_DESCRIPTIONS_GT') ? 2 : 1));
                    $totals['description_'.$description['iso_code']] += $scores['description_'.$description['iso_code']];
                }
            }

模块Git:https://github.com/PrestaShop/statscheckup/blob/master/statscheckup.php