Bugreport: em_event hook modifications lost
-
I’m not sure where to report bugs, so here it goes:
In the EM_Event class constructor, the ’em_event’ hook is done AFTER the object is sent to the wordpress cache. Therefore, all modifications in the hook (e.g. loading additional metadata) are not included in the cache, and effectively disappear when the object is retrieved the next time from cache.
This is usually no problem because the object is always accessed through the em_get_event function, which retrieves the object from the $EM_Event global. However, if the first call of em_get_event does not store the result in the global, a subsequent call retrieves the object from the wordpress cache WITHOUT the modifications done in the ’em_event’ hook. I foudn this to be the case when using Buddypress groups, in the bp_em_private_event_check function.
So please move the ’em_event’ hook to before the wp_cache_set calls.
And if you have a suggestion where bugreports such as these can be posted better, let me know. This is not the first one I found, but it’s the first one I bothered to post here 🙂
The topic ‘Bugreport: em_event hook modifications lost’ is closed to new replies.