[wp-trac] [WordPress Trac] #43990: Use wp_delete_file instead of unlink

WordPress Trac noreply at wordpress.org
Wed May 9 15:53:33 UTC 2018


#43990: Use wp_delete_file instead of unlink
-------------------------------------+-----------------------------
 Reporter:  macbookandrew            |       Owner:  iandunn
     Type:  enhancement              |      Status:  accepted
 Priority:  low                      |   Milestone:  Future Release
Component:  Filesystem API           |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  needs-testing has-patch  |     Focuses:
-------------------------------------+-----------------------------
Changes (by iandunn):

 * owner:  (none) => iandunn
 * priority:  normal => low
 * type:  defect (bug) => enhancement
 * status:  new => accepted
 * milestone:  Awaiting Review => Future Release


Comment:

 [attachment:43990.patch] looks pretty good at first glance.
 `wp_delete_file()` uses the `@` operator when it calls `unlink()`, so I
 don't think we need to keep it when calling `wp_delete_file()`.

 ( ''I kinda think [https://make.wordpress.org/core/handbook/best-practices
 /coding-standards/php/#error-control-operator it shouldn't even be used
 inside wp_delete_file()], but that's another ticket :)'' )

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


More information about the wp-trac mailing list