}
if (is_null($namespace) || $namespace === '*') {
- $themeTranslations = $this->loadPath(theme_path('lang'), $locale, $group);
- $originalTranslations = $this->loadPath($this->path, $locale, $group);
-
+ $themePath = theme_path('lang');
+ $themeTranslations = $themePath ? $this->loadPath($themePath, $locale, $group) : [];
+ $originalTranslations = $this->loadPath($this->path, $locale, $group);
return array_merge($originalTranslations, $themeTranslations);
}