Opened 15 years ago
Closed 15 years ago
#11832 closed defect (bug) (fixed)
merge_with() inconsistency in load_textdomain()
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | major | Version: | 2.9 |
Component: | I18N | Keywords: | |
Focuses: | Cc: |
Description
This code is used in wp-includes/pomo/translations.php
:
function merge_with(&$other) { $this->entries = array_merge($this->entries, $other->entries); }
It creates problems with numeric keys. For example, _e('2')
outputs 4 on a localized version, regardless of the value in a .mo file.
Perhaps something like this should be used:
function merge_with(&$other) { foreach ( $other->entries as $key => $value ) $this->entries[$key] = $value; }
Change History (6)
#2
@
15 years ago
The current WordPress 3.0-alpha revision still uses array_merge()
. Will it be synchronized with GlotPress?
Note: See
TracTickets for help on using
tickets.
This was fixed in http://trac.glotpress.org/changeset/375