Make WordPress Core

Opened 16 months ago

Last modified 13 months ago

#50893 new defect (bug)

wp_send_json_success is nothing, no error for any inf/nan

Reported by: programmin Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.2.5
Component: Media Keywords:
Focuses: Cc:


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 (2)

#1 @programmin
16 months 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 https://core.trac.wordpress.org/ticket/32318

Version 0, edited 16 months ago by programmin (next)

#2 @programmin
13 months 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.

Note: See TracTickets for help on using tickets.