diff --git a/Module.php b/Module.php index 94f40a4..9a42929 100644 --- a/Module.php +++ b/Module.php @@ -70,8 +70,12 @@ public function deleteMediaFiles(Event $event) */ public static function stripLocaleToLang($locale) { + if (is_null($locale)){ #Extra null check added for reliability; encountered a null exception that led me here. + $locale = ""; + } + return explode('_', $locale)[0]; } } -?> \ No newline at end of file +?>