[wp-trac] [WordPress Trac] #31347: Issue with translations api return (undefined index in settings)

WordPress Trac noreply at wordpress.org
Mon Feb 16 17:21:53 UTC 2015


#31347: Issue with translations api return (undefined index in settings)
--------------------------+-----------------------------
 Reporter:  OriginalEXE   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  I18N          |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hi there,

 WordPress version: 4.1
 Theme active: Twenty Fourteen (irrelevant)
 Plugins active: none
 Error: Undefined offset: 1 (wp-includes/l10n.php:945)
 How to reproduce: Go to wp-admin -> Settings -> General and then check
 your error report logs

 So it seems that an array of languages returned by WP api call has an
 issue. I inspected and the language in question is "Hazaragi" (haz).

 The issue happens when languages are being listed in language selection
 "dropdown", the actual code is:

 {{{
 esc_attr( $translation['iso'][1] )
 }}}

 but upon inspection, and for this language only, iso is available under
 key '2' and not '1', not sure why.

 I only found this problem today, not sure if I did not notice or something
 was changed recently in api response. In any case, my tickets search did
 not result in finding the same report so there you go.

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


More information about the wp-trac mailing list