[wp-trac] [WordPress Trac] #55688: Update size function in WP_Filesystem_Direct

WordPress Trac noreply at wordpress.org
Fri May 6 19:21:54 UTC 2022


#55688: Update size function in WP_Filesystem_Direct
------------------------------------------+------------------------------
 Reporter:  mukesh27                      |       Owner:  (none)
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  Awaiting Review
Component:  Filesystem API                |     Version:  2.5
 Severity:  normal                        |  Resolution:
 Keywords:  has-patch close dev-feedback  |     Focuses:
------------------------------------------+------------------------------
Changes (by costdev):

 * keywords:  has-patch => has-patch close dev-feedback
 * version:  trunk => 2.5
 * component:  Media => Filesystem API
 * milestone:  6.0 => Awaiting Review


Comment:

 As this isn't a regression introduced during the 6.0 cycle, I'm removing
 this from the milestone.

 As Sergey has said, the PR introduces a BC break, as the method can no
 longer return `false`, and it's in a mission-critical component.

 This change would also make it possible to filter the result via the
 'pre_wp_filesize' and 'wp_filesize' filters, so this could end up breaking
 BC in a much larger way than removing the `false` return.

 I'm adding `close` as I think this is too risky.

 Adding `dev-feedback` to see what others think about this. If there's a
 desire to have this method call `wp_filesize()`, it needs ''extremely''
 careful consideration. For BC, the checks to cause a `false` return would
 need to be run before calling `wp_filesize()`.

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


More information about the wp-trac mailing list