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
}
// 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);
throw new \Exception($error);
}
......
......@@ -351,11 +351,9 @@ class Template extends Response
// setup directories & namespaces
$themeDir = Module::getModuleDir($this->theme['module']) . '/themes/' . $this->theme['name'];
$subdirs = scandir($themeDir);
$subdirs = @scandir($themeDir);
if (empty($subdirs)) {
// no subdirectories in the theme directory, nothing to do here
// this is probably wrong, log a message
Logger::warning('Empty theme directory for theme "' . $this->theme['name'] . '".');
Logger::warning('Theme directory for theme "' . $this->theme['name'] . '" (' . $themeDir . ') is not readable or is empty.');
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