Flourish PHP Unframework
This is an archived copy of the forum for reference purposes

cache

posted by dao27 9 years ago

why i receive from time to time this warning?

[internal function]: fCache->__destruct()
{doc_root}/inc/flourish/fCache.php(146): fCache->save()
{doc_root}/inc/flourish/fCache.php(310)
Invalid argument supplied for foreach()

I'm not exactly sure why you would be getting this, unless your cache file was being corrupted. In that case I would expect some sort of error from the unserialize operation too.

Either way, try adding the following three lines at line 99 in fCache and let me know if it helps:

if (!is_array($this->cache)) {
	$this->cache = array();	
}
posted by wbond 9 years ago