Title: Serialization issue when saving
Last modified: May 26, 2023

---

# Serialization issue when saving

 *  [p47chy](https://wordpress.org/support/users/p47chy/)
 * (@p47chy)
 * [3 years ago](https://wordpress.org/support/topic/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.

 * ![](https://ps.w.org/transients-manager/assets/icon.svg?rev=1671074)
 * [Transients Manager](https://wordpress.org/plugins/transients-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/transients-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/transients-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/transients-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/transients-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/transients-manager/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [p47chy](https://wordpress.org/support/users/p47chy/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/serialization-issue-when-saving/)
 * Status: not resolved