]> git.mjollnir.org Git - moodle.git/commitdiff
Merged from MOODLE_19_STABLE. Do not produce PHP warnings in case string file does...
authormudrd8mz <mudrd8mz>
Tue, 4 Dec 2007 21:52:16 +0000 (21:52 +0000)
committermudrd8mz <mudrd8mz>
Tue, 4 Dec 2007 21:52:16 +0000 (21:52 +0000)
admin/lang.php

index f0eb1e97355ea98da125f0da45eb17704fa6fed2..31746ee49ad61ba7850c4144024dbcd6f5c21c7d 100644 (file)
             }
             // $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);
             
             if (file_exists($lcfilepath)) {
                 include($lcfilepath);
                 $localfileismissing = 0;
-                if (is_array($string)) {
+                if (isset($string) && is_array($string)) {
                     $lcstring = $string;
                 }
                 unset($string);
             
             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 >>";