Make WordPress Core

Opened 4 years ago

Last modified 2 years ago

#50893 new defect (bug)

wp_send_json_success is nothing, no error for any inf/nan

Reported by: programmin's profile programmin Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.2.5
Component: General Keywords:
Focuses: Cc:

Description

If wp_send_json_success() has an argument array with INF or Nan in it nothing is printed out, no error is given, this can make it really hard to track down errors in the data of attachments for example.

Steps to reproduce issue:

wp_send_json_success( array('a'=>34/0) );

The fact that can continue and print nothing and nothing but a notice shows how bad PHP can be on multiple levels... :( but there should be some error in this function, or perhaps clean the error since I see it is recursively going through the array for something in _wp_json_sanity_check?

Change History (5)

#1 @programmin
4 years ago

Specifically, this happens whenever metadata is stored that it is "INF" bitrate. Whatever that means. https://www.apostlesba.com/hp_wordpress/wp-content/uploads/2020/07/mp3-1.mp3 for example is one file that will error out the media library of any wp site with that uploaded, and is even worse than the media upload fail in bug #32318

Last edited 4 years ago by SergeyBiryukov (previous) (diff)

#2 @programmin
4 years ago

Still happening, wp5.5.3, and still really hard to track down.

SELECT * FROM wp_postmeta where meta_value like '%inf%'

will at least tell you what needs to be removed or changed in the database to get your media library listing back.

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


2 years ago

This ticket was mentioned in Slack in #core-media by joedolson. View the logs.


2 years ago

#5 @antpb
2 years ago

  • Component changed from Media to General

Moving this to General as it does not seem to have a dependency on the Media component logic. This seems more related to any json returned from any case using this function.

Note: See TracTickets for help on using tickets.