[wp-trac] [WordPress Trac] #55678: Avoid `filesize()` warnings when storing file size in media metadata

WordPress Trac noreply at wordpress.org
Tue May 10 16:11:00 UTC 2022


#55678: Avoid `filesize()` warnings when storing file size in media metadata
-------------------------------------------------+-------------------------
 Reporter:  johnbillion                          |       Owner:  audrasjb
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.0
Component:  Media                                |     Version:  trunk
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch commit dev-reviewed        |     Focuses:
  fixed-major                                    |
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"53380" 53380]:
 {{{
 #!CommitTicketReference repository="" revision="53380"
 Media: Remove error suppression in `wp_filesize()`.

 Replace error suppressing in `wp_filesize()` with a `file_exists()` check
 before calling the native PHP `filesize()` function.

 Follow up to [52837].

 Props Cybr, johnbillion, spacedmonkey, antpb, azouamauriac,
 ironprogrammer, mukesh27, costdev, audrasjb, dlh, peterwilsoncc.
 Merges [53372] to the 6.0 branch.
 Fixes #55678.
 See #49412.
 }}}

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


More information about the wp-trac mailing list