2014-02-11T11:12:15+00:00 ERR (3): Warning: Invalid argument supplied for foreach() in /var/www/magento/app/code/local/Bintime/Sinchimport/Block/Layer/View.php on line 19
2014-02-11T11:12:17+00:00 ERR (3): Notice: Undefined variable: bgHandle in /var/www/magento/app/code/community/Magehouse/Slider/Block/Catalog/Layer/Filter/Price.php on line 457
2014-02-11T11:12:17+00:00 ERR (3): Notice: Undefined variable: bgSlider in /var/www/magento/app/code/community/Magehouse/Slider/Block/Catalog/Layer/Filter/Price.php on line 461
2014-02-11T11:12:17+00:00 ERR (3): Notice: Undefined variable: bgRange in /var/www/magento/app/code/community/Magehouse/Slider/Block/Catalog/Layer/Filter/Price.php on line 465
我一直在清理舊的錯誤日誌,這個讓我卡住了。我無法確定哪個文件導致問題(如果有的話)。上面的4個錯誤總是出現在讓步中,所以它可能是一個插件/主題衝突。第一行是指以下插件:警告:爲Magento錯誤日誌中的foreach()提供的無效參數
,其他三個都指向朝着我所相信的是價格滑塊附帶在產品頁面上的主題。
鏈接到開發站點:http://bit.ly/1mAxK2a
該網站是由themeforest運行Magento的1.8.1一個主題叫做地鐵店面。
這裏是View.php:
<?php
class Bintime_Sinchimport_Block_Layer_View extends Mage_Catalog_Block_Layer_View
{
protected $filterableFeatures = array();
/**
* Prepare child blocks
*
* @return Mage_Catalog_Block_Layer_View
*/
protected function _prepareLayout()
{
//получение списка фич, по которым строися навигация
$filterableFeatures = $this->getLayer()->getFilterableFeatures();
$filterBlockName = 'sinchimport/layer_filter_feature'; //block
foreach ($filterableFeatures as $feature) {
$this->filterableFeatures[] = $feature;
$featureBlock = $this->getLayout()->createBlock($filterBlockName)
->setLayer($this->getLayer())
->setAttributeModel($feature)
->init();
$this->setChild('feature_' . $feature['feature_id'] . '_filter',
$featureBlock
);
}
/* ------------ */
return parent::_prepareLayout();
}
/**
* Get all layer filters
*
* @return array
*/
public function getFilters()
{
$filters = parent::getFilters();
/* ------------ */
foreach ($this->filterableFeatures as $feature) {
$filters[] = $this->getChild('feature_' . $feature['feature_id'] . '_filter');
}
/* ------------ */
return $filters;
}
}
這裏是Price.php:
有誰知道這些錯誤的意思或如何解決這些問題?