[wp-trac] [WordPress Trac] #63269: Duplicate array key `Code` in `_WP_Editors::get_translation()`

WordPress Trac noreply at wordpress.org
Sat Apr 12 15:39:21 UTC 2025


#63269: Duplicate array key `Code` in `_WP_Editors::get_translation()`
--------------------------+-----------------------------
 Reporter:  justlevine    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 This is a bug introduced in #38061, where the new `Code` key added to
 `_WP_Editors::get_translation()` on
 [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp-
 editor.php?rev=59696#L1399 Line 1399] overwrites the existing `Code`
 registered on [https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/class-wp-editor.php?rev=59696#L1168 Line 1168].

 {{{
  Line    wp-includes/class-wp-editor.php
  ------- ----------------------------------------------------------------
   :1168   Array has 2 duplicate keys with value 'Code' ('Code', 'Code').
           🪪  array.duplicateKey
 }}}

 ---

 Caught as part of #61175 ([https://github.com/WordPress/wordpress-
 develop/blob/9d8fada0cbbf8c8e42059e5a902e8f82bcb12390/tests/phpstan/baseline/level-0.php#L34
 PHPStan baseline])

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63269>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list