I am getting the following error message when multiple attributes are selected in a category listing and pagination is clicked.
ERR (3): Warning: strlen() expects parameter 1 to be string, array given in /home/site/public_html/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php on line 94
The error relates to this block of code:
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; }
I understand strlen only counts a string but can anyone tell me
- Why it could be getting an array
- Is this a bug in Magento (1.9.3.7)
- How to fix?