Serialization issue when saving
-
If we have a transient that contains e.g. an array value, editing it and saving using the plugin converts it to a “serialized” value (really a doubly-serialized value). Thereafter, every save will apply another layer of serialization. This would break code that depends on the value.
Due to this, I believe that if the value is serialized, it ought to be unserialised first, before updating with set_transient.
This is all because WordPress core function maybe_serialize actually re-serializes strings containing serialized values, for some reason.
- The topic ‘Serialization issue when saving’ is closed to new replies.