]> git.mjollnir.org Git - moodle.git/commitdiff
Check for string before sorting it
authormoodler <moodler>
Mon, 17 Nov 2003 02:19:13 +0000 (02:19 +0000)
committermoodler <moodler>
Mon, 17 Nov 2003 02:19:13 +0000 (02:19 +0000)
lib/moodlelib.php

index 975792590510f3332075fa978bde70c036f1d7b6..74c66358fe0110d7f91be5f0da95c39697a7356e 100644 (file)
@@ -1372,7 +1372,9 @@ function get_list_of_countries() {
 
     include_once("$CFG->dirroot/lang/$lang/countries.php"); 
 
-    asort($string);
+    if (!empty($string)) {
+        asort($string);
+    }
 
     return $string;
 }