language: Avoid warning when 'namespaceGenderAliases' is null

I'm not sure why it can be null, but we do the same thing in two other
places in this file.

Bug: T389260
Change-Id: I2f0c880f79997d60b545d47130ab9f8ff3f35d0f
(cherry picked from commit af83387ac3dd857bc93b2a733a78247d2f8ca8e0)
This commit is contained in:
Bartosz Dziewoński 2025-03-23 01:31:17 +01:00 committed by Reedy
parent 23f0dd44c1
commit f7a0d003c5

View file

@ -564,7 +564,7 @@ class Language implements Bcp47Code {
return false;
} else {
// Check what is in i18n files
$aliases = $this->localisationCache->getItem( $this->mCode, 'namespaceGenderAliases' );
$aliases = (array)$this->localisationCache->getItem( $this->mCode, 'namespaceGenderAliases' );
return count( $aliases ) > 0;
}
}