diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 2a9fed00293..7780f7ffcbe 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -6383,6 +6383,7 @@ class core_string_manager implements string_manager { if (!empty($CFG->langcache) and !empty($this->menucache)) { // cache the list so that it can be used next time collatorlib::asort($languages); + check_dir_exists(dirname($this->menucache), true, true); file_put_contents($this->menucache, json_encode($languages)); } }