MDL-87339 hook: ensure cache directory present/writeable for use.
Avoids PHP warnings during Behat initialisation: - file_put_contents(...): Failed to open stream: No such file or directory; - rename(...): No such file or directory
This commit is contained in:
@@ -678,9 +678,7 @@ final class manager implements
|
||||
* @return string
|
||||
*/
|
||||
protected function get_cache_path(): string {
|
||||
global $CFG;
|
||||
|
||||
return $CFG->localcachedir . '/hookcallbacks.json';
|
||||
return make_localcache_directory('') . '/hookcallbacks.json';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user