mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-26914 fix undefined CFG langcache property during install
This commit is contained in:
parent
62f7ce7989
commit
5f27855ea4
1 changed files with 2 additions and 2 deletions
|
@ -6049,7 +6049,7 @@ class core_string_manager implements string_manager {
|
||||||
|
|
||||||
$languages = array();
|
$languages = array();
|
||||||
|
|
||||||
if ($CFG->langcache and is_readable($this->menucache)) {
|
if (!empty($CFG->langcache) and is_readable($this->menucache)) {
|
||||||
// try to re-use the cached list of all available languages
|
// try to re-use the cached list of all available languages
|
||||||
$cachedlist = json_decode(file_get_contents($this->menucache), true);
|
$cachedlist = json_decode(file_get_contents($this->menucache), true);
|
||||||
|
|
||||||
|
@ -6117,7 +6117,7 @@ class core_string_manager implements string_manager {
|
||||||
unset($string);
|
unset($string);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($CFG->langcache and !empty($this->menucache)) {
|
if (!empty($CFG->langcache) and !empty($this->menucache)) {
|
||||||
// cache the list so that it can be used next time
|
// cache the list so that it can be used next time
|
||||||
textlib_get_instance()->asort($languages);
|
textlib_get_instance()->asort($languages);
|
||||||
file_put_contents($this->menucache, json_encode($languages));
|
file_put_contents($this->menucache, json_encode($languages));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue