Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Normal
With the efforts to transition from serialized to json for storing arrays in XenForo 2.1, it occurred to me that this might not be entirely possible for Custom Fields, since this would mean all 3rd party add-ons would see their custom fields in a non-workable state until such a time as the author could release an update.It would be possible to stagger the switch by adding a new option to XF\Behavior\CustomFieldsHolder :: getDefaultConfig:[code=php]'storage' => 'serialized'[/code]It would then be possible to change the relevant line to[code=php]'field_value' => is_array($value) ? ($this->config['storage'] == 'serialized' ? serialize($value) : json_encode($value)) : $value[/code]Defaulting to "serialized" would allow developers to update their addons at their own pace without breaking backwards compatibility.
With the efforts to transition from serialized to json for storing arrays in XenForo 2.1, it occurred to me that this might not be entirely possible for Custom Fields, since this would mean all 3rd party add-ons would see their custom fields in a non-workable state until such a time as the author could release an update.
serialized
json
It would be possible to stagger the switch by adding a new option to XF\Behavior\CustomFieldsHolder :: getDefaultConfig:
XF\Behavior\CustomFieldsHolder :: getDefaultConfig
[code=php]'storage' => 'serialized'[/code]
It would then be possible to change the relevant line to
[code=php]'field_value' => is_array($value) ? ($this->config['storage'] == 'serialized' ? serialize($value) : json_encode($value)) : $value[/code]
Defaulting to "serialized" would allow developers to update their addons at their own pace without breaking backwards compatibility.
We use essential cookies to make this site work, and optional cookies to enhance your experience.
See further information and configure your preferences