mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-76362 mustache: Override parent method to avoid PHP notices
Parent method checks baseDir that is null in this case. This shows notices under PHP 8.1
This commit is contained in:
parent
8de12b7997
commit
d83368a475
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user