From 10f36d68e80a683a478762df9c00a0b1492e440e Mon Sep 17 00:00:00 2001 From: stronk7 Date: Thu, 5 Oct 2006 19:29:39 +0000 Subject: [PATCH] Avoid some notices. Part of MDL-6854 --- backup/db/migrate2utf8.php | 5 +++-- lib/db/migrate2utf8.php | 15 +++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/backup/db/migrate2utf8.php b/backup/db/migrate2utf8.php index b6577b89fa..b3af4d4167 100755 --- a/backup/db/migrate2utf8.php +++ b/backup/db/migrate2utf8.php @@ -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); diff --git a/lib/db/migrate2utf8.php b/lib/db/migrate2utf8.php index 9d0baa7c4b..15a3ee5a94 100755 --- a/lib/db/migrate2utf8.php +++ b/lib/db/migrate2utf8.php @@ -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')) { -- 2.39.5