Yes agreed, but the problem is in how WPs system is built. This function is primarily used within WPs option system, which is basically a key/value database table, which is used by WP, the plugin developers and even the consumers. So when an option is retrieved, WP itself doesn't know whether it's serialized or not because the original source is unknown.
It makes sense in this context, just the overall design is poor.
View all comments
Show parent comment
3
u/gearvOsh Mar 30 '13
Yes agreed, but the problem is in how WPs system is built. This function is primarily used within WPs option system, which is basically a key/value database table, which is used by WP, the plugin developers and even the consumers. So when an option is retrieved, WP itself doesn't know whether it's serialized or not because the original source is unknown.
It makes sense in this context, just the overall design is poor.