[wp-trac] [WordPress Trac] #43170: Replace all usages of basename() with wp_basename() in order to support multibyte filenames

WordPress Trac noreply at wordpress.org
Sun Jan 28 10:27:23 UTC 2018


#43170: Replace all usages of basename() with wp_basename() in order to support
multibyte filenames
--------------------------+------------------------------
 Reporter:  Viper007Bond  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  4.9.2
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------
Changes (by Viper007Bond):

 * keywords:   => needs-patch


Comment:

 The above attached patch is just one example where we need to swap it out.
 I discovered this when writing a unit test for one of my plugins:

 https://github.com/Viper007Bond/regenerate-
 thumbnails/commit/08f5eabd3ff041938aab0b0d1a3a5bde4aaaaca3#diff-
 35c785b29ba1242d0fbf2db80deb00c8R567

 I ended up having to clone
 `self::factory()->attachment->create_upload_object()` so that I didn't end
 up with `unnamed-file.jpg`.

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


More information about the wp-trac mailing list