Skip to content
Snippets Groups Projects
Commit 08e81cf3 authored by Hanne Moa's avatar Hanne Moa
Browse files

Decouple template path setup and template existence check

parent e8c7f1c5
No related branches found
No related tags found
No related merge requests found
......@@ -131,9 +131,6 @@ class SimpleSAML_XHTML_Template
foreach ($templateDirs as $entry) {
$loader->addPath($entry[key($entry)], key($entry));
}
if (!$loader->exists($this->twig_template)) {
return false;
}
return $loader;
}
......@@ -151,7 +148,8 @@ class SimpleSAML_XHTML_Template
}
// set up template paths
$loader = $this->setupTwigTemplatepaths();
if (!$loader) {
// abort if twig template does not exist
if (!$loader->exists($this->twig_template)) {
return null;
}
......
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