[wp-trac] [WordPress Trac] #16504: Faster maybe_unserialize
WordPress Trac
wp-trac at lists.automattic.com
Wed Feb 9 11:11:52 UTC 2011
#16504: Faster maybe_unserialize
--------------------------+-----------------------------
Reporter: hakre | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.1
Severity: normal | Keywords: has-patch
--------------------------+-----------------------------
In #14429 many have taken care to optimize the is_serialized speed.
The function is of good general value and most often used to "maybe"
unserialize.
It was [http://core.trac.wordpress.org/ticket/14429#comment:3 originally
smabauers] who reminded that it's only about to check what it's about to
check.
''Option values'', if serialized are only serialized Array, Objects or
Strings. No exceptions. And they are ''always trimmed'' strings.
As is_serialized() is of general use and might be used by plugin authors,
maybe_unserialize can get a new playmate.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16504>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list