WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#35009 closed defect (bug) (worksforme)

Function json_last_error_msg() is not compatible with those in PHP 5.5

Reported by: upsell Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: General Keywords:
Focuses: Cc:

Description

Function json_last_error_msg() returns "No Error" if no error has occurred but should null as is in PHP 5.5 version of this function.

Change History (3)

#1 @TobiasBg
4 years ago

  • Keywords reporter-feedback added

Thanks a lot for your report, upsell!

According to the PHP Documentation, json_last_error_msg() returns the string "No error" if there was no error, just as the compatibility function in WordPress does.

Can you therefore maybe clarify what you mean with "should null" here? Thanks!

#2 @upsell
4 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

You are right. I've used old version of:
https://github.com/GetResponse/DevZone/blob/master/API/lib/jsonRPCClient.php
where no error returned null.

My mistake.

#3 @ocean90
4 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.