Skip to content

[FIX] Allow to unserialize only string data

Lupundu Yan requested to merge yan.lupundu/tiki:yan.tiki.Unserialize into master

Task: https://avan.tech/item93721

While analyzing, I noticed that the same error is also present on textarea fields witch need to unserialize data. For example this is also the case for the category_defaults pref. After setting a pref value, when you try to change it you get the same error.

The bug comes from the fact that when we want to modify the value of the pref, we try to userialize the new value to obtain the array (this is normal), but we also try to userialize the old value, this is not necessary since the data is already an array.

Merge request reports