1

我在magento中面临一个大问题。在我的 magento 站点中,用户没有收到订单电子邮件。所以我启用了日志,在这里我发现了错误。

错误是

 Warning: strlen() expects parameter 1 to be string, array given  in /home/{magento}/public_html/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php on line 93 

然后我去了attribute.php文件,在这里我找到了这个函数

public function apply(Zend_Controller_Request_Abstract $request, $filterBlock)
{
    $filter = $request->getParam($this->_requestVar);
    if (is_array($filter)) {
        return $this;
    }
    $text = $this->_getOptionText($filter);
    if ($filter && strlen($text)) {
        $this->_getResource()->applyFilterToCollection($this, $filter);
        $this->getLayer()->getState()->addFilter($this->_createItem($text, $filter));
        $this->_items = array();
    }
    return $this;
}

我检查了 $text 是否给了我一个 ARRAY 以便出现这个问题,但这是一个基本文件,我没有更改任何内容,所以这个错误是如何发生的。

请帮忙...

4

0 回答 0