Skip to content
Snippets Groups Projects
Commit 9e7b71f9 authored by Thijs Kinkhorst's avatar Thijs Kinkhorst
Browse files

Make warning more specific when specified theme or locale does not exist

parent e4fb153b
No related branches found
No related tags found
No related merge requests found
...@@ -206,7 +206,7 @@ class Localization ...@@ -206,7 +206,7 @@ class Localization
} }
// Locale for default language missing even, error out // Locale for default language missing even, error out
$error = "Localization directory missing/broken for langcode '$langcode' and domain '$domain'"; $error = "Localization directory '$langPath' missing/broken for langcode '$langcode' and domain '$domain'";
Logger::critical($_SERVER['PHP_SELF'] . ' - ' . $error); Logger::critical($_SERVER['PHP_SELF'] . ' - ' . $error);
throw new \Exception($error); throw new \Exception($error);
} }
......
...@@ -351,11 +351,9 @@ class Template extends Response ...@@ -351,11 +351,9 @@ class Template extends Response
// setup directories & namespaces // setup directories & namespaces
$themeDir = Module::getModuleDir($this->theme['module']) . '/themes/' . $this->theme['name']; $themeDir = Module::getModuleDir($this->theme['module']) . '/themes/' . $this->theme['name'];
$subdirs = scandir($themeDir); $subdirs = @scandir($themeDir);
if (empty($subdirs)) { if (empty($subdirs)) {
// no subdirectories in the theme directory, nothing to do here Logger::warning('Theme directory for theme "' . $this->theme['name'] . '" (' . $themeDir . ') is not readable or is empty.');
// this is probably wrong, log a message
Logger::warning('Empty theme directory for theme "' . $this->theme['name'] . '".');
return []; return [];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment