Make WordPress Core

Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#21568 closed defect (bug) (fixed)

Update Services_JSON External Library

Reported by: bpetty's profile bpetty Owned by: nacin's profile nacin
Milestone: 3.6 Priority: normal
Severity: normal Version: 3.4.1
Component: External Libraries Keywords: has-patch dev-feedback
Focuses: Cc:


This is an update of Services_JSON used both for compatibility for pre-PHP-5.2, and also for hosts that have explicitly (and sickeningly) disabled json_encode() / json_decode().

Current version included in WordPress is 1.0.1. This updates to version 1.0.3 from upstream.

There's only one single non-upstream change that is included here, and it's a simple include guard, see #11827.

The following bugs were addressed with this update:

  1. - When locale was set, and it changed the way numbers are formated, the output for floats was broken.
  2. - Handle mbstring overloading of strlen().
  3. - Long strings cause problems for parser.

One last note here...

The only other non-upstream changes made to the library within WP core previously were just whitespace changes. In the future, it would be nice to know that whitespace changes should *not* touch 3rd party libraries since 1) they will always have their own coding guidelines, and 2) it makes it difficult to see actual upstream and non-upstream changes between WP core updates.

Attachments (1)

21568.patch (59.7 KB) - added by bpetty 12 years ago.

Download all attachments as: .zip

Change History (5)

12 years ago

#1 @bpetty
12 years ago

  • Cc bpetty added

#2 @bpetty
11 years ago

  • Keywords dev-feedback added
  • Milestone changed from Awaiting Review to 3.6

#3 @nacin
11 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 23376:

Update to Services_JSON 1.0.3. props bpetty. fixes #21568.

#4 @nacin
11 years ago

In 1202/tests:

Basic test that Services_JSON isn't broken. see #21568.

Note: See TracTickets for help on using tickets.