[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:10:11 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 | Keywords:
Focuses: |
--------------------------+-----------------------------
We still use `basename()` in a lot of places even though it isn't
multibyte compatible out of the box. See http://php.net/basename and
https://bugs.php.net/bug.php?id=62119.
Example filename where it can fail: `麻美.jpg`
We should replace all uses of `basename()` with our own `wp_basename()`.
This will probably need a lot of testing, so probably best to avoid one
big patch and instead change calls in small chunks.
Related: #43138
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43170>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list