From 44ac4f62de1f284b402fb37b69e66e8e0daff8f6 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Fri, 28 Oct 2011 16:05:52 +0200 Subject: [PATCH] MDL-29972 make sure lang dir exists before writing into it --- lib/moodlelib.php | 1 + 1 file changed, 1 insertion(+) 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)); } }