[wp-trac] Re: [WordPress Trac] #7383: maybe_serialize() should
serialize all non-string values
WordPress Trac
wp-trac at lists.automattic.com
Thu Feb 19 12:26:47 GMT 2009
#7383: maybe_serialize() should serialize all non-string values
---------------------------------------------------------------+------------
Reporter: DD32 | Owner: anonymous
Type: enhancement | Status: closed
Priority: normal | Milestone: 2.9
Component: General | Version: 2.6
Severity: trivial | Resolution: wontfix
Keywords: has-patch dev-feedback wont-fix not-a-bug invalid |
---------------------------------------------------------------+------------
Changes (by hakre):
* cc: hanskrentel@… (added)
* keywords: has-patch dev-feedback => has-patch dev-feedback wont-fix
not-a-bug invalid
* status: new => closed
* resolution: => wontfix
* severity: normal => trivial
Comment:
There is no need for a fix because this is not a Bug. I would like to see
it as invalid but set it to wontfix first.
The original reporter must have missed something. This is PHP (and
WordPress) and there are no such variable-types like string or integer in
PHP. It is called Scalar and it can be any of the types at any time like
string, integer, bool, float but not resource, object or array.
Additionally serialization is defined in the PHP lanugage as well.
Please check PHP Docs if you are unfamilar with the concept:
http://php.net/manual/en/language.types.intro.php
http://php.net/manual/en/function.serialize.php
http://php.net/manual/en/function.unserialize.php
the function maybe_serialize does not clearly say what it does (I've
critized this already) so therefore the wording "when it's needed" might
be misleading. It only means, that if there is a value to store into the
database as option which is of type array or object it should be
serialized (so therefore it can be stored in there with an SQL query).
Right?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/7383#comment:10>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list