|
|||
|
I sent this to the mailing list but no harm asking here as well
I'm basically caching a feed so its not requested on every page hit. Here's my code PHP Code:
Code:
Warning: Invalid argument supplied for foreach() in /opt/lampp/htdocs/santouras/library/Zend/Feed/Element.php on line 322 correctly, just that this warning is being thrown. Any ideas? |
|
|||
|
The problem is that the Zend_Feed_Rss object is being put to sleep, but not woken after serializing by the Zend Cache.
Add this line after calling $cache->save(...): $lastFM->__wakeup(); This is definitely a bug. Now, whether it's with the Zend_Feed_Rss, or with Zend_Cache, I don't know. |
|
|||
|
I had a similar problem with caching because the XML references in the Feed's objects were not valid. Wakeup probably would have fixed this but I couldn't figure it out at the time.
As I was loading content from several feeds, merging, and sorting by date my solution was to put data from the entries into a two dimensional array and cache that array. So the array just contained arrays of strings, rather than the elements themselves. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|