]> git.mjollnir.org Git - moodle.git/commitdiff
set $result even when $fromenc=="utf-8", to fix "unassigned variable" errors
authorgbateson <gbateson>
Sun, 23 Apr 2006 11:51:17 +0000 (11:51 +0000)
committergbateson <gbateson>
Sun, 23 Apr 2006 11:51:17 +0000 (11:51 +0000)
mod/hotpot/db/migrate2utf8.php

index 4fe747519d3bebb196db8823bee1cecb483f51ca..03279e82802c117b3188fabac359d12b43b9f650 100755 (executable)
@@ -34,8 +34,10 @@ function migrate2utf8_hotpot_strings_string($recordid){
         $newhotpotstrings->id = $recordid;
         $newhotpotstrings->string = $result;
         migrate2utf8_update_record('hotpot_strings',$newhotpotstrings);
-    /// And finally, just return the converted field
+    } else {
+        $result = false;
     }
+/// And finally, just return the converted field
     return $result;
 }
 
@@ -82,8 +84,10 @@ function migrate2utf8_hotpot_questions_name($recordid){
         $newhotpotquestion->id = $recordid;
         $newhotpotquestion->name = $result;
         migrate2utf8_update_record('hotpot_questions',$newhotpotquestion);
-    /// And finally, just return the converted field
+    } else {
+        $result = false;
     }
+/// And finally, just return the converted field
     return $result;
 }
 
@@ -120,8 +124,10 @@ function migrate2utf8_hotpot_name($recordid){
         $newhotpot->id = $recordid;
         $newhotpot->name = $result;
         migrate2utf8_update_record('hotpot',$newhotpot);
-/// And finally, just return the converted field
+    } else {
+        $result = false;
     }
+/// And finally, just return the converted field
     return $result;
 }
 
@@ -158,6 +164,8 @@ function migrate2utf8_hotpot_summary($recordid){
         $newhotpot->id = $recordid;
         $newhotpot->summary = $result;
         migrate2utf8_update_record('hotpot',$newhotpot);
+    } else {
+        $result = false;
     }
 /// And finally, just return the converted field
     return $result;
@@ -196,6 +204,8 @@ function migrate2utf8_hotpot_password($recordid){
         $newhotpot->id = $recordid;
         $newhotpot->password = $result;
         migrate2utf8_update_record('hotpot',$newhotpot);
+    } else {
+        $result = false;
     }
 /// And finally, just return the converted field
     return $result;