It looks like that this problems appears most of users. There are some recommended fix too:
1: Delete following file:
app/etc/use_cache.ser
2: Update database with following query:
SET FOREIGN_KEY_CHECKS=0; UPDATE `core_store` SET store_id = 0 WHERE code='admin'; UPDATE `core_store_group` SET group_id = 0 WHERE name='Default'; UPDATE `core_website` SET website_id = 0 WHERE code='admin'; UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN'; SET FOREIGN_KEY_CHECKS=1;
3: Somes says error is due to .htaccess and some says database and they recommend fresh installation of Magento.
4: In my case, it got fixed by turning off Data Collection cache. I had large site, with almost 1 million + products. We found cache was increasing as exponential rate. It makes sense as database size was large, the Data Collection cache was large, which can not be handled by file handler hence causing break.
Disable Cache in following way:
a. Magento Admin -> System -> Cache Management
b. Select Data Collection Cache and disable it.
The full dump of Warning/Notice on system.log
yyyy-mm-ddTxx:25:01+00:00 ERR (3): Warning: Invalid argument supplied for foreach() in /......./lib/Varien/Object.php on line 245 yyyy-mm-ddTxx:25:01+00:00 ERR (3): Recoverable Error: Argument 1 passed to Varien_Object::addData() must be an array, integer given, called in /......./lib/Varien/Data/Collection/Db.php on line 575 and defined in /......./lib/Varien/Object.php on line 243 yyyy-mm-ddTxx:25:01+00:00 ERR (3): Warning: Invalid argument supplied for foreach() in /......./lib/Varien/Object.php on line 245 yyyy-mm-ddTxx:25:01+00:00 ERR (3): Recoverable Error: Argument 1 passed to Mage_Core_Model_Store::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in /......./app/code/core/Mage/Core/Model/App.php on line 634 and defined in /......./app/code/core/Mage/Core/Model/Store.php on line 395 yyyy-mm-ddTxx:25:01+00:00 ERR (3): Recoverable Error: Argument 1 passed to Mage_Core_Model_Store::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in /......./app/code/core/Mage/Core/Model/App.php on line 634 and defined in /......./app/code/core/Mage/Core/Model/Store.php on line 395 yyyy-mm-ddTxx:25:01+00:00 ERR (3): Recoverable Error: Argument 1 passed to Mage_Core_Model_Store::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in /......./app/code/core/Mage/Core/Model/App.php on line 634 and defined in /......./app/code/core/Mage/Core/Model/Store.php on line 395 yyyy-mm-ddTxx:25:01+00:00 ERR (3): Recoverable Error: Argument 1 passed to Mage_Core_Model_Store_Group::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in /......./app/code/core/Mage/Core/Model/App.php on line 654 and defined in /......./app/code/core/Mage/Core/Model/Store/Group.php on line 275 yyyy-mm-ddTxx:25:01+00:00 ERR (3): Recoverable Error: Argument 1 passed to Mage_Core_Model_Store_Group::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in /......./app/code/core/Mage/Core/Model/App.php on line 654 and defined in /......./app/code/core/Mage/Core/Model/Store/Group.php on line 275 yyyy-mm-ddTxx:25:01+00:00 ERR (3): Recoverable Error: Argument 1 passed to Mage_Core_Model_Store_Group::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in /......./app/code/core/Mage/Core/Model/App.php on line 654 and defined in /......./app/code/core/Mage/Core/Model/Store/Group.php on line 275 yyyy-mm-ddTxx:25:01+00:00 ERR (3): Recoverable Error: Argument 1 passed to Mage_Core_Model_Store_Group::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in /......./app/code/core/Mage/Core/Model/App.php on line 654 and defined in /......./app/code/core/Mage/Core/Model/Store/Group.php on line 275
Source: www.krishnasunuwar.com.np
I know. But I\’m developer and I do not have many time for my blog..