[wp-trac] [WordPress Trac] #28480: is_serialized() returns wrong value

WordPress Trac noreply at wordpress.org
Tue Jun 10 03:08:28 UTC 2014


#28480: is_serialized() returns wrong value
-------------------------------------+------------------------------
 Reporter:  extendwings              |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Database                 |     Version:  3.9.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+------------------------------

Comment (by csixty4):

 Thanks for taking the time to report this! However, I can't reproduce it.
 I wonder if there's some kind of multibyte character encoding issue.

 Do you have PHP's locale set to Japan or something other than en_US?

 Test code:

 {{{
 add_action('init', 'check_is_serialized');
 function check_is_serialized() {
         echo (true === is_serialized('a:1:{s:11:"contributor";b:1;}')) ?
 'true' : 'false';die();
 }
 }}}

 When we narrow down the exact cause, there should probably be a unit test
 case added to test_is_serialized() in tests/phpunit/tests/functions.php

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28480#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list