MDL-29972 make sure lang dir exists before writing into it

This commit is contained in:
Petr Skoda 2011-10-28 16:05:52 +02:00
parent 38e9a1cc79
commit 44ac4f62de

View File

@ -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));
}
}