Making WordPress.org


Ignore:
Timestamp:
09/29/2020 05:55:00 AM (6 years ago)
Author:
dd32
Message:

API: Translations: Ignore locales installed on sites that we don't recognise.

Avoids PHP Notices on API requests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/translations/lib.php

    r8349 r10310  
    7979    foreach ( $translations as $translation ) {
    8080        $locale = GP_Locales::by_field( 'wp_locale', $translation->language );
     81        if ( ! $locale ) {
     82            // Locale not known to us.
     83            continue;
     84        }
    8185
    8286        $isos = array( 1 => false, 2 => false, 3 => false );
Note: See TracChangeset for help on using the changeset viewer.