WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 9 days ago

Last modified 9 days ago

#27799 closed defect (bug) (wontfix)

json_last_error is not provided by JSON compatibility layer

Reported by: rmccue Owned by: rmccue
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: dev-feedback has-patch needs-refresh
Focuses: javascript Cc:

Description

The json_last_error function isn't provided in wp-includes/compat.php with the rest of the JSON compatibility functions, despite being available in PHP's JSON since 5.3.

Looking into this, it *should* be trivial to add error handling, but possibly non-trivial for exact compatibility with PHP.

Attachments (1)

27799.diff (2.4 KB) - added by wonderboymusic 4 years ago.

Download all attachments as: .zip

Change History (11)

#1 @DrewAPicture
5 years ago

  • Focuses javascript added
  • Keywords needs-patch dev-feedback added

Somebody want to make a patch?

This ticket was mentioned in Slack in #core-restapi by rachelbaker. View the logs.


4 years ago

#3 @rmccue
4 years ago

  • Milestone changed from Awaiting Review to 4.3
  • Owner set to rmccue
  • Status changed from new to assigned

Let's get it done.

#4 @rachelbaker
4 years ago

@rmccue Can you work-up a patch or should this be punted?

This ticket was mentioned in Slack in #core by wonderboymusic. View the logs.


4 years ago

@wonderboymusic
4 years ago

#6 @wonderboymusic
4 years ago

  • Milestone changed from 4.3 to Future Release

#7 @swissspidy
2 years ago

  • Keywords has-patch needs-refresh added; needs-patch removed

Stumbled upon this while looking at the json_last_error_msg() compat function.

@rmccue Wanna give 27799.diff a go?

#8 @jrf
9 days ago

May I suggest for this ticket to be closed ? Now PHP 5.6.20 is the new minimum PHP version, AFAICS this is no longer relevant.

#9 @pento
9 days ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from assigned to closed

Aye, we don't need this as a compat function any more.

#10 @jrf
9 days ago

@pento FYI: I've got all the compat removal patches ready, will open a ticket for these & upload them later today.

Note: See TracTickets for help on using tickets.