Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 5 years ago

#18015 closed defect (bug) (fixed)

Restore compat Services_JSON (class-json.php), json_encode, json_decode

Reported by: nacin's profile nacin Owned by: nacin's profile nacin
Milestone: 3.2.1 Priority: high
Severity: normal Version:
Component: External Libraries Keywords:
Focuses: Cc:

Description

A fair number of servers and distributions are, by default, missing the JSON extension for PHP. The number is actually a bit surprising, and is enough that we need to go forth with restoring these.

While core does not heavily rely on JSON, a number of actions will fail without it, and a lot of plugins rely on it. Without a compat layer, we'll see fatal errors.

Plugins, coincidentally, have relied on the existence of Services_JSON in class-json.php for unknown reasons, given they should have been using json_encode() and json_decode() directly since 2.9. Restoring this file in place should fix some of those compatibility issues, though I'd like to still get all of those plugins to change their bad ways.

Change History (3)

#1 @nacin
13 years ago

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

In [18404]:

Restore compat for json_decode and json_encode. fixes #18015 for trunk.

#2 @nacin
13 years ago

In [18405]:

Restore compat for json_decode and json_encode. fixes #18015 for 3.2.

This ticket was mentioned in Slack in #core-php by sergey. View the logs.


5 years ago

Note: See TracTickets for help on using tickets.