]> git.mjollnir.org Git - moodle.git/commitdiff
Avoid some notices. Part of MDL-6854
authorstronk7 <stronk7>
Thu, 5 Oct 2006 19:29:39 +0000 (19:29 +0000)
committerstronk7 <stronk7>
Thu, 5 Oct 2006 19:29:39 +0000 (19:29 +0000)
backup/db/migrate2utf8.php
lib/db/migrate2utf8.php

index b6577b89fac6363cf2c1d028cd9a935307cbcc98..b3af4d4167aa2df952694f10ffb4be97e0ac3bff 100755 (executable)
@@ -24,8 +24,9 @@ function migrate2utf8_backup_ids_info($recordid){
         $fromenc = get_original_encoding($sitelang, $courselang, $userlang);
     }
 
-/// We are going to use textlib facilities
-    
+/// Initialise $result
+    $result = $backupids->info;
+
 /// Convert the text
     if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
         $result = utfconvert($backupids->info, $fromenc);
index 9d0baa7c4bbcd0489a31fab8bc638e1d3329f616..15a3ee5a942b7c6125b7375ca10f0e41e80fb88f 100755 (executable)
@@ -250,7 +250,9 @@ function migrate2utf8_role_name($recordid){
                $userlang = null; // Non existing
         $fromenc = get_original_encoding($sitelang, $courselang, $userlang);
     }
-/// We are going to use textlib facilities
+
+/// Initialise $result
+    $result = $role->name;
 
 /// Convert the text
     if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
@@ -286,7 +288,9 @@ function migrate2utf8_role_description($recordid){
                $userlang = null; // Non existing
         $fromenc = get_original_encoding($sitelang, $courselang, $userlang);
     }
-/// We are going to use textlib facilities
+
+/// Initialise $result
+    $result = $role->description;
 
 /// Convert the text
     if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
@@ -594,7 +598,9 @@ function migrate2utf8_config_value($recordid){
 
         $fromenc = get_original_encoding($sitelang, $courselang, $userlang);
     }
-/// We are going to use textlib facilities
+
+/// Initialise $result
+    $result = $config->value;
     
 /// Convert the text
     if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {
@@ -670,7 +676,8 @@ function migrate2utf8_course_categories_name($recordid){
         $fromenc = get_original_encoding($sitelang, $courselang, $userlang);
     }
 
-/// We are going to use textlib facilities
+/// Initialise $result
+    $result = $coursecategories->name;
     
 /// Convert the text
     if (($fromenc != 'utf-8') && ($fromenc != 'UTF-8')) {