[wp-trac] [WordPress Trac] #50893: wp_send_json_success is nothing, no error for any inf/nan
WordPress Trac
noreply at wordpress.org
Tue Aug 11 06:15:16 UTC 2020
#50893: wp_send_json_success is nothing, no error for any inf/nan
--------------------------+-----------------------------
Reporter: programmin | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 5.2.5
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
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?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50893>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list