[wp-trac] [WordPress Trac] #33524: json_encode giving invalid UTF-8 sequence followed by maxed CPU's

WordPress Trac noreply at wordpress.org
Tue Aug 25 01:19:11 UTC 2015


#33524: json_encode giving invalid UTF-8 sequence followed by maxed CPU's
-------------------------------------+------------------
 Reporter:  thehrisworld             |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  4.4
Component:  General                  |     Version:  4.1
 Severity:  normal                   |  Resolution:
 Keywords:  needs-testing has-patch  |     Focuses:
-------------------------------------+------------------
Changes (by pento):

 * keywords:  needs-testing => needs-testing has-patch
 * version:   => 4.1
 * milestone:   => 4.4


Comment:

 Ah, I see. It looks like this is an expected warning - you're getting a
 warning for the first `json_encode()` call (which checks to see if it can
 safely encode), but not for the second one, which happens after the data
 has been sanitised.

 I think it's reasonable for us to just suppress this warning, as the point
 of `wp_json_encode()` is to handle the situations that cause that warning
 to occur.

 Could I get you to try [attachment:33524.diff], and see if that removes
 the warning?

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


More information about the wp-trac mailing list