我的Magento system.log已滿,出現此錯誤: 注意:數組到字符串轉換位於1232行的/app/code/core/Mage/Core/Block/Abstract.php中。Magento日誌中的數組到字符串轉換錯誤
我增加這裏的代碼:(規則1232 $關鍵=破滅(「|」,$鍵);)
/**
* Get Key for caching block content
*
* @return string
*/
public function getCacheKey()
{
if ($this->hasData('cache_key')) {
return $this->getData('cache_key');
}
/**
* don't prevent recalculation by saving generated cache key
* because of ability to render single block instance with different data
*/
$key = $this->getCacheKeyInfo();
//ksort($key); // ignore order
$key = array_values($key); // ignore array keys
$key = implode('|', $key);
$key = sha1($key);
return $key;
}
你知道發生了什麼事情錯了,我需要改變? 提前謝謝!
謝謝你的回答!我應該在哪裏放置這個法師代碼? – DutchTech
我會把它放在行後面: // ksort($ key); //忽略順序 這將創建一個新的日誌文件,您可以在/ var/log/ – khoekman
中找到好的,謝謝,我做到了。我已經添加了你的第一個代碼。現在我們必須等待新的日誌。 ;) – DutchTech