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:
Paul Holden
2025-11-27 19:03:17 +00:00
parent 52c6473e16
commit c75b3722f1
+1 -3
View File
@@ -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';
}
/**