[wp-trac] Re: [WordPress Trac] #9663: is_serialized() should be renamed to might_be_serialized();

WordPress Trac wp-trac at lists.automattic.com
Mon May 25 18:29:14 GMT 2009


#9663: is_serialized() should be renamed to might_be_serialized();
--------------------------+-------------------------------------------------
 Reporter:  hakre         |       Owner:  anonymous     
     Type:  defect (bug)  |      Status:  new           
 Priority:  normal        |   Milestone:  Future Release
Component:  Charset       |     Version:  2.7.1         
 Severity:  normal        |    Keywords:                
--------------------------+-------------------------------------------------
Changes (by vladimir_kolesnikov):

 * cc: vladimir@… (added)


Comment:

 Re: UTF-8: Disagreed. Regexps used in is_serialized() are UTF-8 safe:

 /^[bid]:[0-9.E-]+;$/ does not contain any characters that could be
 interpreted as multibyte in UTF-8

 /^[aOs]:[0-9]+:.*[;}]$/s - its head (up to .*) is multibyte-safe; tailing
 ';' or '}' are guaranteed not to be a part of a multibyte character since
 only one character symbols are in the range of U+0000...U+007F

 Re: N; - actually very interesting - should a plugin store "N;" in
 wp_options, it would get NULL in get_option(). But I am not sure if it is
 possible to fix this without breaking backward compatibility.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9663#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list