[wp-trac] [WordPress Trac] #21109: maybe_unserialized fails to unserialize multibyte strings (contains solution)
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 29 10:28:48 UTC 2012
#21109: maybe_unserialized fails to unserialize multibyte strings (contains
solution)
------------------------------------+------------------------------
Reporter: veedeezee | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.4
Severity: normal | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+------------------------------
Comment (by SergeyBiryukov):
Related: #6532, #6784, #9549
To clarify, `preg_replace()` is used to fix string lengths. This exact fix
was suggested in [comment:ticket:6532:8].
I can only reproduce this if `DB_CHARSET` value in `wp-config.php` doesn't
match the actual DB charset (e.g. `latin1` vs. `utf8_general_ci`), as
mentioned in [comment:ticket:6784:3].
With the fix, the strings are still unreadable due to charset differences,
but at least it allows other data to be unserialized properly. Perhaps the
strings would be readable under some circumstances, needs more
investigating.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21109#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list