[wp-trac] [WordPress Trac] #28786: wp_send_json silently fails on non UTF-8 strings

WordPress Trac noreply at wordpress.org
Sun Nov 2 18:20:30 UTC 2014


#28786: wp_send_json silently fails on non UTF-8 strings
------------------------------+-----------------------
 Reporter:  pento             |       Owner:  pento
     Type:  defect (bug)      |      Status:  reopened
 Priority:  normal            |   Milestone:  4.1
Component:  Formatting        |     Version:  3.5
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+-----------------------

Comment (by mdawaffe):

 Replying to [comment:38 pento]:
 > I think our better option is to fix the places that call
 `wp_json_encode()`, to ensure proper type checking.

 I also agree :) `json_encode()` can also return false, so these places
 where a failing `wp_json_encode()` breaks things are already places where
 a failing `json_encode()` breaks things.

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


More information about the wp-trac mailing list