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 | 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)
#2
@
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.
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