[wp-trac] [WordPress Trac] #55376: Use wp_filesize in core
WordPress Trac
noreply at wordpress.org
Tue May 10 10:31:03 UTC 2022
#55376: Use wp_filesize in core
--------------------------------------+-----------------------------
Reporter: spacedmonkey | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: General | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has-patch | Focuses:
--------------------------------------+-----------------------------
Comment (by SergeyBiryukov):
Replying to [comment:4 spacedmonkey]:
> https://github.com/WordPress/wordpress-
develop/blob/ba518c2d86e62ed63b24e9a720d42aee3ab951fb/src/wp-
admin/includes/class-wp-filesystem-direct.php#L490
>
> https://github.com/WordPress/wordpress-
develop/blob/33048b933379ae48723f617588ed8aa996ca5d14/src/wp-
admin/includes/class-wp-filesystem-ssh2.php#L649
>
> https://github.com/WordPress/wordpress-
develop/blob/2d707c45127d204936eef48b3c9e133b60596b33/src/wp-
admin/includes/update-core.php#L1256
I would suggest not to use `wp_filesize()` in `WP_Filesystem_*` classes or
other mission-critical parts like the `update_core()` function, due to
backward compatibiltity concerns. See the discussion in
comment:2:ticket:55688.
Using `wp_filesize()` in other instances seems fine at a glance.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55376#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list