[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
Mon Feb 25 15:58:38 UTC 2019


#43170: Replace all usages of basename() with wp_basename() in order to support
multibyte filenames
-----------------------------+---------------------
 Reporter:  Viper007Bond     |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  5.2
Component:  Media            |     Version:  4.9.2
 Severity:  normal           |  Resolution:
 Keywords:  has-patch early  |     Focuses:
-----------------------------+---------------------

Comment (by ocean90):

 Some quick notes on [attachment:"43170.diff"]:

 * There should be no need to use `wp_basename()` for `__FILE__ `
 * I also don't think we have to use `wp_basename()` when we know fore sure
 that no multibyte-like string is possible, for example `$lang_file`
 * Third-party libraries shouldn't be changed.
 * Like Joe said, documentation shouldn't be changed to "wp_basename".
 * Maybe focus only on media-related functions first?

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


More information about the wp-trac mailing list