[wp-trac] Re: [WordPress Trac] #7383: maybe_serialize() should
serialize all non-string values
WordPress Trac
wp-trac at lists.automattic.com
Tue Jan 20 10:47:23 GMT 2009
#7383: maybe_serialize() should serialize all non-string values
------------------------------------+---------------------------------------
Reporter: DD32 | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 2.9
Component: General | Version: 2.6
Severity: normal | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+---------------------------------------
Changes (by Denis-de-Bernardy):
* keywords: has-patch => has-patch dev-feedback
Comment:
personally, I think that checking for is_numeric() would get the job done
in a more efficient manner. as in, store the numeric option as a string
(no serialization required, i.e. fast). then, when instantiating the
option, use is_numeric() (fast) and convert to float or string as
necessary if it is numeric.
boolean is a bit different imo. if my memory serves me well, it currently
gets serialized, and it probably should get converted to an integer before
getting stored. that was get_option() would only return false when the
option is undefined.
--
Ticket URL: <http://trac.wordpress.org/ticket/7383#comment:8>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list