[wp-trac] [WordPress Trac] #50972: media_handle_sideload() does not allow $post_data to override the post_date that gets used by wp_upload_dir

WordPress Trac noreply at wordpress.org
Thu Feb 4 15:48:19 UTC 2021


#50972: media_handle_sideload() does not allow $post_data to override the post_date
that gets used by wp_upload_dir
--------------------------+-----------------------------
 Reporter:  jamesgol      |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  5.7
Component:  Media         |     Version:  5.3
 Severity:  minor         |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------
Changes (by Mista-Flo):

 * keywords:  has-patch needs-unit-tests => has-patch


Comment:

 So unfortunately, we can not add some unit tests easily for this function.

 The patch seems quite minimal, so it shouldn't affect that much.

 That said, we need some steps in order to do some manual testing, would be
 nice to get it tested by 2 different people at least.

 In the meantime, we should open another ticket to handle the refactoring
 part in order to make unit test creation possible for these functions.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50972#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list