mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merged from MOODLE_19_STABLE. Do not produce PHP warnings in case string file does not define array $string[]
This commit is contained in:
parent
ade79a4768
commit
1dfc37b8fe
@ -225,7 +225,7 @@
|
||||
}
|
||||
// $enstring = English strings distributed either in the core space or in plugin space
|
||||
include($enfilepath);
|
||||
$enstring = $string;
|
||||
$enstring = isset($string) ? $string : array();
|
||||
unset($string);
|
||||
ksort($enstring);
|
||||
|
||||
@ -234,7 +234,7 @@
|
||||
if (file_exists($lcfilepath)) {
|
||||
include($lcfilepath);
|
||||
$localfileismissing = 0;
|
||||
if (is_array($string)) {
|
||||
if (isset($string) && is_array($string)) {
|
||||
$lcstring = $string;
|
||||
}
|
||||
unset($string);
|
||||
@ -519,9 +519,9 @@
|
||||
|
||||
unset($string);
|
||||
include($enfilepath);
|
||||
$enstring = $string;
|
||||
$enstring = isset($string) ? $string : array();
|
||||
//
|
||||
// TODO/FIXME: IMHO following should not be here as the strings have moved into langconfig.php -- mudrd8mz
|
||||
// Following strings have moved into langconfig.php, but keep the here for backward compatibility
|
||||
//
|
||||
if ($currentlang != 'en' and $currentfile == 'moodle.php') {
|
||||
$enstring['thislanguage'] = "<< TRANSLATORS: Specify the name of your language here. If possible use Unicode Numeric Character References >>";
|
||||
|
Loading…
x
Reference in New Issue
Block a user