diff --git a/lib/classes/output/mustache_filesystem_loader.php b/lib/classes/output/mustache_filesystem_loader.php index f90623ce47a..e79b479fed5 100644 --- a/lib/classes/output/mustache_filesystem_loader.php +++ b/lib/classes/output/mustache_filesystem_loader.php @@ -53,4 +53,16 @@ class mustache_filesystem_loader extends \Mustache_Loader_FilesystemLoader { // Call the Moodle template finder. return mustache_template_finder::get_template_filepath($name); } + + /** + * Only check if baseDir is a directory and requested templates are files if + * baseDir is using the filesystem stream wrapper. + * + * Always check path for mustache_filesystem_loader. + * + * @return bool Whether to check `is_dir` and `file_exists` + */ + protected function shouldCheckPath() { + return true; + } }