[wp-trac] [WordPress Trac] #25280: wp_localize_script unexpectedly convert numbers to strings

WordPress Trac noreply at wordpress.org
Wed Sep 11 16:57:05 UTC 2013


#25280: wp_localize_script unexpectedly convert numbers to strings
-----------------------------+------------------------------
 Reporter:  adamsilverstein  |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  I18N             |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:  has-patch close  |
-----------------------------+------------------------------

Comment (by c3mdigital):

 Also to note the way JSON_NUMERIC_CHECK handles booleans.

 Before patch:
 `var TESTING = {"false":"","true":"1","integer":"234"};`

 after patch:
 `var TESTING = {"false":"","true":1,"integer":234};`

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


More information about the wp-trac mailing list