]> BookStack Code Mirror - bookstack/blobdiff - app/Translation/FileLoader.php
Merge branch 'v21.05.x'
[bookstack] / app / Translation / FileLoader.php
index 1ed7b06ccc593b35e6f24896c86063776c963190..775eefc472b72f1553253ee376cbd2fe50c63569 100644 (file)
@@ -24,9 +24,9 @@ class FileLoader extends BaseLoader
         }
 
         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);
         }