Opened 10 years ago
Closed 10 years ago
#39168 closed defect (bug) (fixed)
Double slash when loading mu-plugin textdomain
| Reported by: | nsundberg | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.8 |
| Component: | I18N | Version: | 4.6 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
load_muplugin_textdomain() creates double slashes for load_textdomain(). The function first uses trailingslashit() and then concatenating the path and filename with an additional /.
See lines 756-758 trunk/src/wp-includes/l10n.php#L756:
$path = trailingslashit( WPMU_PLUGIN_DIR . '/' . ltrim( $mu_plugin_rel_path, '/' ) ); return load_textdomain( $domain, $path . '/' . $mofile );
Attachments (1)
Change History (5)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Introduced in [37414].
I think we can keep the slash and remove the
trailingslashit()call instead, for consistency withload_plugin_textdomain()andload_theme_textdomain().