From: tjhunt Date: Tue, 13 Jan 2009 06:03:26 +0000 (+0000) Subject: edit profile: MDL-15607 Edit profile form breaks if the list of countries in the... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=94c224619ce38387044217fe42884288050a0e82;p=moodle.git edit profile: MDL-15607 Edit profile form breaks if the list of countries in the language pack is broken. After this patch it still breaks, unavoidably, but at least there is now an error message. --- diff --git a/lang/en_utf8/error.php b/lang/en_utf8/error.php index 6cc2194ebc..f584e8e9e7 100644 --- a/lang/en_utf8/error.php +++ b/lang/en_utf8/error.php @@ -172,6 +172,7 @@ $string['commentmisconf'] = 'Comment ID is misconfigured'; $string['componentisuptodate'] = 'Component is up-to-date'; $string['confirmsesskeybad'] = 'Sorry, but your session key could not be confirmed to carry out this action. This security feature prevents against accidental or malicious execution of important functions in your name. Please make sure you really wanted to execute this function.'; $string['couldnotassignrole'] = 'A serious but unspecified error occurred while trying to assign a role to you'; +$string['countriesphpempty'] = 'Error: The file countries.php in language pack $a is empty or missing.'; $string['coursegroupunknown'] = 'Course corresponding to group $a not specified'; $string['coursemisconf'] = 'Course is misconfigured'; $string['courserequestdisabled'] = 'Sorry, but requesting courses has been disabled by the administrator'; diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 74cbb802f2..ac669dfd01 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -5767,6 +5767,8 @@ function get_list_of_countries() { if (!empty($string)) { uasort($string, 'strcoll'); + } else { + print_error('countriesphpempty', '', '', $lang); } return $string;