The FeedsSimplePieEnclosure saves a Simplepie_Enclosure in variable $simplepie_enclosure. When the FeedsSimplePieEnclosure object is unserialized the has generally not been loaded so the object is incomplete.

PHP Fatal error:  FeedsSimplePieEnclosure::getValue(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "SimplePie_Enclosure" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition  in /....../modules/contrib/feeds/plugins/ on line 21

To make the class definition be loaded before the unserialize I've added a __sleep __wakeup that does the serialization of that variable separately. [git diff a/ b/ patch so patch -p1 <]

SimplePieEnclosure.serialize.patch1.17 KBekes


alex_b’s picture

Status:Needs review» Reviewed & tested by the community

This looks like a sane approach to me.

alex_b’s picture

Title:FeedsSimplePieEnclosure not queue (un)serialization safe.» Make FeedsSimplePieEnclosure (un)serialization safe
Status:Reviewed & tested by the community» Fixed

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.