Skip to content
Snippets Groups Projects
Unverified Commit 8095c122 authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

bugfix: Do not crash when a module that contains a theme doesn't have a "templates" directory.

This resolves #695.
parent 5f074e97
No related branches found
No related tags found
No related merge requests found
...@@ -173,7 +173,11 @@ class SimpleSAML_XHTML_Template ...@@ -173,7 +173,11 @@ class SimpleSAML_XHTML_Template
$templateDirs[] = array($this->module => $this->getModuleTemplateDir($this->module)); $templateDirs[] = array($this->module => $this->getModuleTemplateDir($this->module));
} }
if ($this->theme['module']) { if ($this->theme['module']) {
$templateDirs[] = array($this->theme['module'] => $this->getModuleTemplateDir($this->theme['module'])); try {
$templateDirs[] = array($this->theme['module'] => $this->getModuleTemplateDir($this->theme['module']));
} catch (\InvalidArgumentException $e) {
// either the module is not enabled or it has no "templates" directory, ignore
}
} }
// default, themeless templates are checked last // default, themeless templates are checked last
......
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