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

WordPress Trac noreply at wordpress.org
Tue May 10 05:00:29 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-feedback  |     Focuses:
-------------------------------------------+-----------------------
Changes (by peterwilsoncc):

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


Comment:

 In [changeset:"53372" 53372]:
 {{{
 #!CommitTicketReference repository="" revision="53372"
 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.
 Fixes #55678.
 See #49412.
 }}}

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


More information about the wp-trac mailing list