diff --git a/core/i18n.php b/core/i18n.php index 25190b1eb..6f0f45db8 100755 --- a/core/i18n.php +++ b/core/i18n.php @@ -1872,13 +1872,15 @@ class i18n extends Object { // Load translations from themes $themesBase = $base . '/themes'; - foreach(scandir($themesBase) as $theme) { - if( - strpos($theme, SSViewer::current_theme()) === 0 - && file_exists($file = "$themesBase/$theme/lang/$locale.php") - ) { - if ($force_load) include($file); - else include_once($file); + if(is_dir($themesBase)) { + foreach(scandir($themesBase) as $theme) { + if( + strpos($theme, SSViewer::current_theme()) === 0 + && file_exists($file = "$themesBase/$theme/lang/$locale.php") + ) { + if ($force_load) include($file); + else include_once($file); + } } }