WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#21568 closed defect (bug) (fixed)

Update Services_JSON External Library

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

Description

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. http://pear.php.net/bugs/bug.php?id=16908 - When locale was set, and it changed the way numbers are formated, the output for floats was broken.
  2. http://pear.php.net/bugs/bug.php?id=17515 - Handle mbstring overloading of strlen().
  3. http://pear.php.net/bugs/bug.php?id=17921 - 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 7 years ago.

Download all attachments as: .zip

Change History (5)

@bpetty
7 years ago

#1 @bpetty
7 years ago

  • Cc bpetty added

#2 @bpetty
7 years ago

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

#3 @nacin
7 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
7 years ago

In 1202/tests:

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

Note: See TracTickets for help on using tickets.