diff --git a/includes/class-locale.php b/includes/class-locale.php index 384e4314..cb0f40fb 100644 --- a/includes/class-locale.php +++ b/includes/class-locale.php @@ -28,7 +28,7 @@ class Locale extends GP_Locale { /** * Array of available translations data obtained with wp_get_available_translations() for the locale. * - * @var array + * @var array|null */ public $translations; @@ -78,11 +78,7 @@ public function __construct( $locale ) { */ public function has_translations() { - if ( is_null( $this->translations ) ) { - return false; - } else { - return true; - } + return is_array( $this->translations ) && array() !== $this->translations; } }