Making WordPress.org


Ignore:
Timestamp:
02/14/2019 01:56:01 AM (6 years ago)
Author:
dd32
Message:

Translate: Stats Overview: Fix a PHP Notice when a Locale can't be found.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/stats-overview.php

    r6689 r8242  
    2929                $set_slug = 'default';
    3030                // Variants (de/formal for example) don't have GP_Locales in this context
    31                 if ( ! $gp_locale && ( list( $base_locale_slug, $set_slug ) = explode( '/', $locale_slug ) ) ) {
     31                if ( ! $gp_locale && strpos( $locale_slug, '/' ) && ( list( $base_locale_slug, $set_slug ) = explode( '/', $locale_slug ) ) ) {
    3232                    $_gp_locale = GP_Locales::by_slug( $base_locale_slug );
    3333                    if ( $_gp_locale ) {
Note: See TracChangeset for help on using the changeset viewer.